1.? 查看firewall服務(wù)狀態(tài)
systemctl status firewalld
2.啟動(dòng)/關(guān)閉/重啟firewall
systemctl start/stop/restart firewalld
3.禁用或者啟用firewall
systemctl disable/enable firewalld
4.? 查看端口是否開放
firewall-cmd --query-port=8020/tcp
firewall-cmd --query-port=8020/udp
5. 新增開發(fā)端口
firewall-cmd --add-port=5000/tcp --permanent
firewall-cmd --add-port=5000/udp --permanent
6.? 關(guān)于服務(wù):
firewall-cmd --add-service=ftp --permanent
firewall-cmd --remove-service=ftp --permanent
7.? 查看firewall狀態(tài)
firewall-cmd --status
systemctl status firewalld
8. 查看 firewall目前開放的內(nèi)容
firewall-cmd --list-all
9.? 查看開放的端口
firewall-cmd --list-port