开放端口:
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