CentOS 6/7關閉防火牆命令
阿新 • • 發佈:2018-12-02
CentOS6關閉防火牆:
service iptables stop //臨時關閉 chkconfig iptables off //禁止開機啟動
注: Centos7使用同樣命令,會提示
stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
CentOS7關閉防火牆:
systemctl stop firewalld //臨時關閉 systemctl disable firewalld //禁止開機啟動 Removed symlink/etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
也可以安裝iptables-services,使用下面的命令
yum install -y iptables-services //安裝iptables-services service iptables stop //關閉防火牆 service iptables status //檢查防火牆狀態