檢視 firewalld 狀態
systemctl status firewalld
開啟 firewalld
systemctl start firewalld
關閉 firewalld
systemctl stop firewalld
設定開啟啟用或禁用 firewalld
開機禁用 : systemctl disable firewalld
開機啟用 : systemctl enable firewalld
開放某埠
// --permanent 永久生效,沒有此引數重啟後失效
firewall-cmd --zone=public --add-port=80/tcp --permanent
重新載入
firewall-cmd --reload
檢視埠狀態
firewall-cmd --zone=public --query-port=80/tcp
刪除開放的埠
firewall-cmd --zone=public --remove-port=80/tcp --permanent
CentOS 關閉防火牆
centos 6 1 永久性生效,重啟後不會復原 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後復原 開啟 service iptables start 關閉 service iptables stop centos 7 s...
centos 關閉防火牆及 selinux
1 檢視防火牆狀態 firewall cmd state 2 停止firewall systemctl stop firewalld.service 3 禁止firewall開機啟動 systemctl disable firewalld.service 4 關閉selinux vi etc sel...
centos7關閉防火牆, 開放及檢視埠
檢視 防火牆 狀態 sudo systemctl status firewalld.service關閉防火牆 sudo systemctl stop firewalld.service 停止firewall sudo systemctl disable firewalld.service 禁止fir...