1,安裝firewalld
2富腊,開啟firewalld
systemctl start firewalld
3,開啟端口
firewall-cmd --permanent --zone=public --add-port=8080/tcp
4墩朦,關(guān)閉端口
firewall-cmd --permanent --zone=public --remove-port=8080/tcp
5克婶,保存設(shè)置
systemctl reload firewalld
6,查看狀態(tài)
systemctl status firewalld