zoukankan      html  css  js  c++  java
  • Linux关闭防火墙步骤

    1   先查询防火墙状态

    [root@old-09 ~]# /etc/init.d/iptables status
    Table: filter
    Chain INPUT (policy ACCEPT)
    num  target     prot opt source               destination         
    1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
    3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
    4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
    5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
    
    Chain FORWARD (policy ACCEPT)
    num  target     prot opt source               destination         
    1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
    
    Chain OUTPUT (policy ACCEPT)
    num  target     prot opt source               destination         

    2   关闭防火墙

     /etc/init.d/iptable stop  (执行2次怕1次关不上)

    [root@o09 ~]# /etc/init.d/iptables stop
    iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
    iptables: Flushing firewall rules:                         [  OK  ]
    iptables: Unloading modules:                               [  OK  ]

    [root@o09 ~]# /etc/init.d/iptables status
    iptables: Firewall is not running. 

    3   查看是否开机自动启动 (数字3项)

    [root@o09 ~]# chkconfig | grep iptables
    
    iptables       0:off   1:off   2:on    3:on    4:on    5:on    6:off

    4   关闭开机自动启动软件

    [root@o09 ~]# chkconfig iptables off

    5   检查是否关闭

    [root@o09 ~]# chkconfig | grep iptables
    
    iptables       0:off   1:off   2:off   3:off   4:off   5:off   6:off
  • 相关阅读:
    hdu2795-Billboard(线段树应用好题)
    AC自动机模板
    kmp模板
    字符串Hash模板
    (可持久化)带修莫队的实现方法
    HZNU1544众数问题
    NOIP2006提高组第二题-金明的预算方案
    Python学习笔记
    (模板)唯一分解定理
    Java 7 源码学习系列(二)——Enum
  • 原文地址:https://www.cnblogs.com/imp-W/p/10317814.html
Copyright © 2011-2022 走看看