防火墙的基本使用命令
systemctl start firewalld.service
systemctl stop firewalld.service
systemctl enable firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
systemctl is-enabled firewalld.service
firewall-cmd --zone=public --list-ports
firewall-cmd --reload
firewall-cmd --get-active-zones
firewall-cmd --get-zone-of-interface=eth0
firewall-cmd --panic-on
firewall-cmd --panic-off
# 添加 (permanent表示永久生效)
firewall-cmd --zone=public --add-port=80/tcp --permanent
# 查看端口是否开放
firewall-cmd --zone=public --query-port=80/tcp
# 删除
firewall-cmd --zone=public --remove-port=80/tcp --permanent