1. 查看防火墙状态
systemctl status firewalld.service
2. 关闭防火墙
systemctl stop firewalld.service
3. 开机自动关闭防火墙
systemctl disable firewalld.service
4. 查看开放的端口号
firewall-cmd --list-ports
5. 开放对应的端口号
firewall-cmd --zone=public --ad-port=8080/tcp --permanent
6. 关闭端口号
firewall-cmd --zone=public --remove-port=8080/tcp --permanent
7. 重启防火墙
firewall-cmd --reload
8. 开机启动防火墙
systemctl enable firewalld.service