服务器在线 - IDC服务商 - 服务器软件 - 网站地图 服务器在线,专注于服务器技术!

当前位置:主页 > 服务器系统 > Linux > 正文

CentOS7 防火墙常用命令

时间:2019-08-07    来源:未知    投稿:admin    点击:

文章来源:超级云

firewalld防火墙:
查看防火墙状态:firewall-cmd --state 
关闭防火墙:systemctl stop firewalld.service
开启防火墙:systemclt start firewalld.service
开启状态:running              关闭状态:not running
开启80端口:
firewall-cmd --permanent --zone=public --add-port=80/tcp


iptables防火墙(这个防火墙是自己装上去的)
安装iptables命令:yum install iptables-services
查看iptables防火墙:systemctl status iptables.service
关闭iptables防火墙:systemctl stop iptables.service
开启iptables防火墙:systemctl start iptables.service
重启iptables防火墙:systemctl restart iptables.service

如果您的问题仍未解决,还可以加入服务器在线技术交流QQ群:8017413寻求帮助。