linux 防火墙

1、查看防火墙是否安装。使用命令  chkconfig  --list ,将列出所有的服务及其开启时的运行等级:


说明iptable会在等级  2~5运行。你也可以使用命令 chkconfig --level 2345 iptables on 命令设置该服务默认启动。
2、查看防火墙状态:service iptables status

即使服务运行了,防火墙也不一定起作用,你还得看防火墙规则的设置,iptables  -L
上述命令的返回值如果显示没有防火墙规则 ,那就是不起作用;反之就是防火墙在起作用。

3、启动iptables服务:service iptables start;

4、停止iptables服务:service iptables stop;

posted @ 2013-03-01 11:36  雨心竹  阅读(150)  评论(0编辑  收藏  举报