Centos7 关闭防火墙相关
#关闭防火墙和SElinux安全模式:
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
getenforce
会显示:Permissive
关闭防火墙
systemctl stop iptables
systemctl disable iptables
yum remove iptables
rm -rf /etc/sysconfig/iptables
rm -rf /etc/sysconfig/iptables-config
systemctl stop firewalld.service
systemctl disable firewalld.service
#放行端口:(若面向外网,可向外网开放端口)
firewall-cmd --zone=pubilc --add-port=80/tcp --permanent
#重启防火墙:
firewall-cmd --reload