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. Python 编程快速上手 第八章总结

    在下面函数中的()中,可为相对路径,也可为绝对路径. 获知当前目录,改变当前目录,查看当前目录 更改当前目录:os.getcwd() 改变当前目录:os.chdir() 查看当前目录:os.listd ...

  2. 【转】 strrchr()函数---C语言

    转自:https://baike.baidu.com/item/strrchr/4621437?fr=aladdin   函数名称: strrchr 函数原型:char *strrchr(const ...

  3. exam_review to M1

    1. 情态动词,尤其是can/can’t,should/shouldn’t. for example: You should have washed the wound.你应该已经洗好了伤口 Well ...

  4. gcc -02引起内存溢出'unsigned i'应修订为'volatile unsigned i'

    2017-12-13 10:44:19gcc -02引起内存溢出'unsigned i'应修订为'volatile unsigned i' 1.3.100 driver/char/random.cst ...

  5. nginx本地缓存

    Nginx 作为Web服务器或者负载均衡器,一般不执行业务逻辑,而是将请求转到后端服务器,比如 Tomcat 或者 php-fpm,后端处理完毕之后将经过 nginx 将数据返回给用户.在请求转发的过 ...

  6. 关于.babelrc中的stage-0,stage-1,stage-2,stage-3

    文章链接:https://www.cnblogs.com/chris-oil/p/5717544.html

  7. git:not a git repository (or any of the parent directories)

    我用git add file添加文件时出现了这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说 ...

  8. UI BOL 练习 get value set attr

    " " " " "**********************change list************************* "2 ...

  9. python中的ConfigParser模块

    1.简介 我们经常需要使用配置文件,例如.conf和.ini等类型,使用ConfigPaser模块可以对配置文件进行操作. 2.示例 现有配置文件test.ini,其内容如下: [section_a] ...

  10. weblogic为同一domain下的不同server添加不同参数

    一.背景 今天应用提需求说:现有一应用部署在多个server上,该应用会使用Ddubbo.protocol.port参数指定的端口去启动dubbo,现在想要做到的效果是为每个server的Ddubbo ...