//检查防火墙状态
firewall-cmd --state
firewall-cmd --list-all
//Disable firewall
systemctl disable firewalld
systemctl stop firewalld
systemctl status firewalld
//Enable firewall
systemctl enable firewalld
systemctl start firewalld
systemctl status firewalld
//添加开放端口并生效
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
//重载
sudo firewall-cmd --reload
//列表查看是否加好
firewall-cmd --list-all