1.查看防火牆狀態
systemctl status firewalld
firewall-cmd --state #查看默認防火牆狀態(關閉后顯示notrunning,開啟后顯示running)
2.查看防火牆是否開機啟動
systemctl is-enabled firewalld
3.關閉防火牆
systemctl stop firewalld
systemctl stop firewalld.service
systemctl status firewalld
4.禁用防火牆(系統啟動時不啟動防火牆服務)
systemctl disable firewalld
systemctl disable firewalld.service
systemctl is-enabled firewalld