systemctl stop firewalld.service #停止firewall
systemctl startfirewalld.service #啟動firewall
systemctl disable firewalld.service #禁止firewall開機啟動
systemctl enable iptables.service #允許開機自啟
firewall-cmd --state #檢視狀態
vim /etc/sysconfig/iptables #檢視防火牆配置埠
yum install iptables #安裝防火牆配置檔案
yum install iptables-services #安裝防火牆服務
service iptables restart #重新啟動防火牆
配置檔案配置 新增在 22 埠下面(注意必須是下面)埠是你所要開放的埠
-a input -p tcp -m state --state new -m tcp --dport 80 -j accept
Centos7 4防火牆firewalld相關操作
啟動 systemctl start firewalld 檢視狀態 systemctl status firewalld 停止 systemctl disable firewalld 禁用 systemctl stop firewalld 啟動乙個服務 systemctl start firewal...
centos7 4 防火牆的配置
systemctl status firewalld.service firewalld.service firewalld dynamic firewall daemon loaded loaded usr lib systemd system firewalld.service disabled...
CentOS 關閉防火牆
centos 6 1 永久性生效,重啟後不會復原 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後復原 開啟 service iptables start 關閉 service iptables stop centos 7 s...