systemctl status firewalld
systemctl start firewalld
systemctl stop firewalld
service firewalld start
先用:systemctl unmask firewalld.service
然后:systemctl start firewalld.service
netstat -anp
firewall-cmd --query-port=8080/tcp
提示 yes,表示开启;no表示未开启。
firewall-cmd --query-port=8080/tcp
firewall-cmd --add-port=8080/tcp --permanent
重载入添加的端口:
firewall-cmd --reload
firewall-cmd --query-port=8080/tcp
firewall-cmd --permanent --remove-port=8080/tcp
原文出处:https://www.cnblogs.com/zhuomou/p/15817770.html