ITeye博客

关闭liunx防火墙操作

bjameng · 2015-04-30 10:29 · liunx · 操作系统 · Markdown

  1. 关闭liunx防火墙(不需要重启,立即生效。重启后失效):

    关闭:service iptables stop
    开启:service iptalbles start
    
  2. 关闭liunx防火墙(需要重启才能生效,重启系统对此没有影响)

    关闭:chkconfig iptables off
    开启:chkconfig iptables on 
    
  3. 在防火墙中开启某个端口,在/etc/sysconfig/iptables中加入以下代码

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
    

     注意: 加入以上代码请不要加入到最后行,请加入到22端口号后面即可。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。