1)查看防火墙状态:
/etc/init.d/iptables?status
暂时关闭防火墙:
/etc/init.d/iptables?stop
禁止防火墙在系统启动时启动
/sbin/chkconfig?--level?2345?iptables?off
重启iptables:
/etc/init.d/iptables?restart
?
?
重启后生效?
开启:?chkconfig?iptables?on?
关闭:?chkconfig?iptables?off?或者?/sbin/chkconfig?--level?2345?iptables?off
2)?即时生效,重启后失效
service?方式
开启:?service?iptables?start?
关闭:?service?iptables?stop
iptables方式
查看防火墙状态:
/etc/init.d/iptables?status
暂时关闭防火墙:
/etc/init.d/iptables?stop
重启iptables:
/etc/init.d/iptables?restart
原文:http://lwpsoft.iteye.com/blog/2183189