CentOS 7防火墙的关闭与开启

(1)CentOS 7.0默认使用的是firewall作为防火墙;若没有启用iptables 作为防火墙,则使用以下方式关闭防火墙:

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

(2)若已经启用iptables作为防火墙,则使用以下方式关闭:

service iptables stop #临时关闭防火墙

chkconfig iptables off #永久关闭防火墙

原文地址:https://www.cnblogs.com/wanerhu/p/14061572.html