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

Linux关闭防火墙步骤的更多相关文章

  1. linux关闭防火墙

    查看防火墙状态: sudo service iptables status linux关闭防火墙命令: sudo service iptables stop linux启动防火墙命令: sudo se ...

  2. Linux关闭防火墙、SELinux

    使用root权限: Linux关闭防火墙: 1. chkconfig –list|grep iptables 2. chkconfig iptables off 永久关闭防火墙 3. chkconfi ...

  3. centOS 6.5关闭防火墙步骤

    centOS 6.5关闭防火墙步骤 关闭命令:  service iptables stop         永久关闭防火墙:chkconfig iptables off 两个命令同时运行,运行完成后 ...

  4. LINUX关闭防火墙(转载)

    (1) 重启后永久性生效: 开启:chkconfig iptables on 关闭:chkconfig iptables off (2) 即时生效,重启后失效: 开启:service iptables ...

  5. 转:linux关闭防火墙iptables

    ref:https://jingyan.baidu.com/article/066074d64f433ec3c21cb000.html Linux系统下面自带了防火墙iptables,iptables ...

  6. LINUX关闭防火墙、开放特定端口等常用操作

    1. 重启后永久性生效: 开启:chkconfig iptables on 关闭:chkconfig iptables off 2. 即时生效,重启后失效: 开启:service iptables s ...

  7. Linux关闭防火墙、设置端口

    关闭防火墙 1)重启后生效 开启: chkconfig iptables on 关闭: chkconfig iptables off 验证防火墙是否关闭:chkconfig --list |grep ...

  8. linux关闭防火墙方法

    在关闭防火墙之前需要查看防火墙的状态,可以使用service iptables status命令来查看,确定防火墙是否开启再来进行关闭操作. 如果想临时开启防火墙使用命令service iptable ...

  9. Linux关闭防火墙,关闭Selinux

    查看防火墙状态 iptables -L or service iptables status 临时性关闭防火墙 iptables -F or service iptables stop 永久性关闭防火 ...

随机推荐

  1. idel 快捷键 记录

    1.找到实现一个类或者接口子类的快捷键 ctrl + B父类或父方法定义 ctrl + alt + B子类或子方法实现 2.跳转上次 下次 操作 ctrl + alt + -->  / < ...

  2. pandas的时间戳

    pandas时间: p1=pd.Timestamp(2018, 2, 3) p1输出:2018-02-03 00:00:00 p1输出类型:<class 'pandas._libs.tslib. ...

  3. java.lang.IllegalArgumentException: Service Intent must be explicit 解决办法

    java.lang.IllegalArgumentException: Service Intent must be explicit 意思是服务必须得显式的调用 我之前是这样使用绑定Service的 ...

  4. android------eclipse运行错误提示 Failed to load D:\Android\sdk\build-tools\26.0.0-preview\lib\dx.jar

    更新了SDK后,在ecplise上运行项目时出现了一个问题. 一运行就提示这个错误:Your project contains error(s), please fix them before run ...

  5. es的分词器analyzer

    analyzer   分词器使用的两个情形:  1,Index time analysis.  创建或者更新文档时,会对文档进行分词2,Search time analysis.  查询时,对查询语句 ...

  6. Django的缓存

    由于Django是动态网站,所有每次请求均会去数据进行相应的操作,当程序访问量大时,耗时必然会更加明显, 最简单解决方式是使用:缓存,缓存将一个某个views的返回值保存至内存或者memcache中, ...

  7. Integer To Roman leetcode java

    问题描述: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range fr ...

  8. VitrualBox、vagrant、homestead的关系

    VitrualBox 是一款非常强大的免费虚拟机软件,使用者可以在 VitrualBox 上安装并运行 Linux.Windows.Mac OS X 等操作系统,类似的软件还有 VMware Vagr ...

  9. hadoop集群添加新节点

    0.说明 Hadoop集群已经运行正常,现在新买了一些机子,要加入到集群里面增加新的节点.以下就是增加的过程. 1.配置运行环境 安装与master和其他slave相同的java环境,jdk版本要相同 ...

  10. leetcode-algorithms-1 two sum

    leetcode-algorithms-1 two sum Given an array of integers, return indices of the two numbers such tha ...