centos7防火墙开放端口与关闭防火墙
开放端口:
firewall-cmd --permanent --add-port=80/tcp
重新加载(使配置生效):
firewall-cmd --reload
关闭和打开防火墙:
systemctl stop firewalld
systemctl start firewalld
禁止开机启动:
systemctl disable firewalld
查看规则 :
firewall-cmd --list-all
查看是否开启:
firewall-cmd --state
致读者:感谢你阅读本文,请随手点击右下角的推荐或分享,谢谢!