centos7 关闭 防火墙

CentOS 7 默认使用的是firewall作为防火墙

关闭firewall:

systemctl stop firewalld.service  #停止firewall

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

systemctl restart iptables.service #最后重启防火墙使配置生效

systemctl enable iptables.service #设置防火墙开机启动

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

猜你喜欢

转载自www.cnblogs.com/jtlgb/p/10313973.html