查看防火墙状态
firewall-cmd --state
running表示正在运行
关闭防火墙
systemctl stop firewalld.service
禁止防火墙开机启动
systemctl disable firewalld.service
开启防火墙端口80
firewall-cmd --zone=public --add-port=80/tcp --permanent
-
重新载入
firewall-cmd --reload
firewall-cmd --state
running表示正在运行
systemctl stop firewalld.service
systemctl disable firewalld.service
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload