iptables 开启与关闭

 

查看iptables规则的话,就用iptables -L这个命令就好了~~,ok

清除iptables规则的话,用iptables -F ,that‘s aaaaalllllll~~

关闭,可以有两种命令,一种是敲击 /etc/init.d/iptables stop   另一种是 services iptables stop ,ok

看到了吧,上面就是两个命令的使用。

然后我们在执行一些chkconfig,看看 六个状态下的命令开启设置,因为这个是涉及到重启以后是否你修改的命令~~

是吧,七个状态 还记得么,关机的时候敲init 0,状态那里0的一列全是关闭。

那chkconfig iptables off(设置自动启动为关闭)

chkconfig iptables on(设置自动启动为启动)

chkconfig --del iptables(移除开启自启动)

chkconfig --add iptables(增加开启自启动)

 这几个命令你回了么? :)

猜你喜欢

转载自blog.csdn.net/wangshuminjava/article/details/82660438