# systemctl start firewalld # systemctl stop firewalld # systemctl enable firewalld # systemctl disable firewalld
# firewall-cmd --state # firewall-cmd --list-all # firewall-cmd --list-interfaces # firewall-cmd --get-service # firewall-cmd --query-service service_name # firewall-cmd --add-port=8080/tcp
開放服務 --permanent 表示永久生效
# firewall-cmd --add-service=http # firewall-cmd --permanent --add-service=http # systemctl restart firewalld