centos 7 开启端口重启防火墙
- 启动: systemctl start firewalld
- 查看状态: systemctl status firewalld
- 停止: systemctl disable firewalld
- 禁用: systemctl stop firewalld
- 启动一个服务:systemctl start firewalld.service
- 关闭一个服务:systemctl stop firewalld.service
- 重启一个服务:systemctl restart firewalld.service
- 显示一个服务的状态:systemctl status firewalld.service
- 在开机时启用一个服务:systemctl enable firewalld.service
- 在开机时禁用一个服务:systemctl disable firewalld.service
- 查看服务是否开机启动:systemctl is-enabled firewalld.service
- 查看已启动的服务列表:systemctl list-unit-files|grep enabled
- 查看启动失败的服务列表:systemctl --failed
3.配置firewalld-cmd
- 查看版本: firewall-cmd --version
- 查看帮助: firewall-cmd --help
- 显示状态: firewall-cmd --state
- 查看所有打开的端口: firewall-cmd --zone=public --list-ports
- 更新防火墙规则: firewall-cmd --reload
- 查看区域信息: firewall-cmd --get-active-zones
- 查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0
- 拒绝所有包:firewall-cmd --panic-on
- 取消拒绝状态: firewall-cmd --panic-off
- 查看是否拒绝: firewall-cmd --query-panic
- 添加
- firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
- 重新载入
- firewall-cmd --reload
- 查看
- firewall-cmd --zone= public --query-port=80/tcp
- 删除
- firewall-cmd --zone= public --remove-port=80/tcp --permanent
centos 7 开启端口重启防火墙的更多相关文章
- Centos 7 开启端口
CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的 CentOS 7 采用了 firewalld 防火墙 如要查询是否开启80端口则: 1 ...
- CentOS开启和关闭防火墙
CentOS Linux开启和关闭防火墙命令有两种,一种是临时的,重启即复原:另外一种是永久性的,重启不会复原. 1) 临时生效,重启后复原 开启: service iptables start ...
- centos 6 防火墙开启端口无效问题
昨天尝试redis在centos的安装,配置文件都检查了,外网就是不能访问 #添加端口开启 $ iptables -A INPUT -p tcp --dport 6379 -j ACCEPT #保存配 ...
- Centos防火墙开启端口
linux系统对外开放80.8080等端口,防火墙设置 我们很多时候在liunx系统上安装了web服务应用后(如tomcat.apache等),需要让其它电脑能访问到该应用,而Linux系统(cent ...
- 在CentOS或RHEL防火墙上开启端口
转载自:https://linux.cn/article-4243-1.html 如果希望在服务器上提供服务,诸如CentOS或RHEL的企业级Linux发行版包含内置的强大防火墙,它们默认的防火墙规 ...
- Centos查看端口占用情况和开启端口命令
Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令: lsof -i tcp:80 列出所有端口 netstat -ntlp 1.开启端口(以80端口为例)方法一: /sbin/i ...
- Centos查看端口占用和开启端口命令
Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令: lsof -i tcp:80 列出所有端口 netstat -ntlp 1.开启端口(以80端口为例) 方法一: /sbin/ ...
- [转]Centos 查看端口占用情况和开启端口命令
http://www.cnblogs.com/xqzt/p/4919191.html 1.Centos 查看端口占用 比如查看 80 端口占用情况使用如下命令: lsof -i tcp:80 2.列出 ...
- Centos7,配置防火墙,开启端口
原文链接:https://blog.csdn.net/u013410747/article/details/61696178 适用于CentOS 7 64位的指令: .查看已开放的端口(默认不开放任何 ...
随机推荐
- 【转】关于启用 HTTPS 的一些经验分享
随着国内网络环境的持续恶化,各种篡改和劫持层出不穷,越来越多的网站选择了全站 HTTPS.HTTPS 通过 TLS 层和证书机制提供了内容加密.身份认证和数据完整性三大功能,可以有效防止数据被查看或篡 ...
- Selenium2入门(一)简介
Selenium 是一款有名的 Web 应用程序测试框架,用于进行功能测试.新版本 Selenium 2 结合了 Selenium 1 和 WebDriver(Selenium 的并行项目)中的最佳特 ...
- ILGenerator.Emit动态 MSIL编程(二)之基础
public sealed class ColorToArgb { /// <summary> /// 将十六进制转化为AGRB /// </summary> /// < ...
- Three.js开发指南---使用构建three.js的基本组件(第二章)
.gui本章的主要内容 1 场景中使用哪些组件 2 几何图形和材质如何关联 3 正投影相机和透视相机的区别 一,Three所需要的基本元素 场景scene:一个容器,用来保存并跟踪所有我们想渲染的物体 ...
- 将 ASP.NET MVC3 Razor 项目部署到虚拟主机中
国内很多网站空间都只支持.NET 2.0 和 .NET 3.0 3.5,很少有空间商支持.NET 4的,即使有个别支持.NET 4,但是不支持MVC的默认路由访问形式. Go Daddy 的主机支持, ...
- asp.net动态设置标题title 关键字keywords 描述descrtptions
推荐的简单做法如下: protected void Page_Load(object sender, EventArgs e){//Page titlePage.Title = "This ...
- <<软技能,代码之外的生存技能>>读书笔记
管理 1. 制定大目标,再分解成小目标,定时反思自己的长期和短期的成果 2. 人都希望自己很重要, 要让下属有存在感,让他们做事有成就感 3. 奖励积极比惩罚消极更有用 4. 学会换位思考,不要用&q ...
- DDGSpring2016 Demos
I followed the course http://brickisland.net/DDGSpring2016/, and here is the screenshot of my coding ...
- sevice__属性介绍: android:exported
http://blog.csdn.net/lhf0000/article/details/6576327 http://blog.csdn.net/berry666/article/details/2 ...
- Flask 的 Context 机制
转自https://blog.tonyseek.com/post/the-context-mechanism-of-flask/ Flask 的 Context 机制 2014 年 07 月 21 日 ...