查看防火墻狀態(tài)
systemctl status firewalld
開啟防火墻
systemctl start firewalld
關(guān)閉防火墻
systemctl stop firewalld
開機(jī)禁用?
systemctl disable firewalld
開機(jī)啟用
systemctl enable firewalld
查看當(dāng)前firewall狀態(tài)
firewall-cmd --state
重啟firewall
firewall-cmd --reload
禁止開機(jī)啟動(dòng)
systemctl disable firewalld.service
查看已經(jīng)開放的端口:
firewall-cmd --list-ports
開啟端口
firewall-cmd --zone=public --add-port=80/tcp --permanent