Linux7.x系統(tǒng)關(guān)閉防火墻iptables命令如下:
查看防火墻的狀態(tài):firewall-cmd –state或者使用iptables -L
關(guān)閉防火墻:systemctl stop firewalld.service,但是開機(jī)之后還會(huì)啟動(dòng)防火墻
systemctl disable firewalld.service #禁止firewall開機(jī)啟動(dòng)
查看防火墻配置:cat /etc/sysconfig/iptables-config
Linux6.x系統(tǒng)關(guān)閉防火墻iptables命令如下:
查看防火墻的狀態(tài):service iptables status 或者使用iptables -L
關(guān)閉防火墻:service iptables stop ,但是開機(jī)之后還會(huì)啟動(dòng)防火墻
chkconfig iptables off #禁止firewall開機(jī)啟動(dòng)
查看防火墻配置:cat /etc/sysconfig/iptables
備注說明:
1. iptables在Linux6和7系統(tǒng),開啟或者關(guān)閉命令和配置文件名都發(fā)生變化
2. ipv6的防火墻,將對(duì)應(yīng)的命令進(jìn)行修改比如,將iptables改成ip6tables就是開啟或者關(guān)閉ipv6的防火墻