1,安装firewalld
2,开启firewalld
systemctl start firewalld
3,开启端口
firewall-cmd --permanent --zone=public --add-port=8080/tcp
4,关闭端口
firewall-cmd --permanent --zone=public --remove-port=8080/tcp
5,保存设置
systemctl reload firewalld
6,查看状态
systemctl status firewalld
网友评论