sudo firewall-cmd --zone=public --add-service=http
sudo firewall-cmd --zone=public --add-service=https
sudo firewall-cmd --zone=public --permanent --add-service=https
sudo firewall-cmd --zone=public --add-port=8080/tcp
sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp
sudo firewall-cmd --zone=public --remove-service=http
sudo firewall-cmd --zone=public --permanent --remove-service=http
sudo firewall-cmd --reload
firewall-cmd --get-services
firewall-cmd --get-zones
sudo firewall-cmd --zone=public --list-all
sudo firewall-cmd --zone=public --list-all --permanent
firewall-cmd --get-default-zone
sudo firewall-cmd --zone=public --permanent --list-services
原文:https://www.cnblogs.com/testopsfeng/p/13904889.html