防火墙指令
1. 查看防火墙状态:
firewall-cmd --state
2. 启动防火墙
systemctl start firewalld.service
3. 关闭防火墙
systemctl stop firewalld.service
4. 禁止防火墙开机启动
systemctl disable firewalld.service
---------------------------------------------------------------------------------------------
5. 释放端口
firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
6. 重新加载
firewall-cmd --reload
7. 查看
firewall-cmd --zone= public --query-port=80/tcp
8. 删除
firewall-cmd --zone= public --remove-port=80/tcp --permanent
如有问题,欢迎纠正!!!
https://www.cnblogs.com/Charles-Yuan/p/9737460.html