linux 关闭防火墙

时间:2014-07-31 21:23:07   收藏:0   阅读:324

linux 关闭防火墙

1. 重启后生效

开启: chkconfig iptables on
关闭: chkconfig iptables off

2. 即时生效,重启后失效

开启: service iptables start
关闭: service iptables stop

3. 在开启了防火墙时,做如下设置,开启相关端口,

修改/etc/sysconfig/iptables 文件,添加以下内容:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT

4.永久关闭:

chkconfig –level 2345 iptables off

linux 关闭防火墙,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!