1、查看iptables状态

/etc/init.d/iptables status  # 方法1
service iptables status   # 方法2

2、重启后永久生效

chkconfig  iptables on             # 永久开启
chkconfig iptables off # 永久关闭
chhconfig --list | grep iptables  # 查看状态

3、即时生效,重启后无效

service iptbles start          # 启动
service iptbles stop # 关闭
service iptbles status # 查看状态
# 另一种写法(推荐)
/etc/init.d/iptbles start # 启动
/etc/init.d/iptbles stop # 关闭
/etc/init.d/iptbles status # 查看状态

4、永久关闭selinux

编辑selinux文件:vi /etc/sysconfig/selinux,修改成:SELINUX=disabled,即可

5、临时关闭selinux

setenforce 0     # 设置SELinux 成为permissive模式
setenforce 1 # 设置SELinux 成为enforcing模式

6、查看selinux状态命令

sestatus       # 方法1
getenforce # 方法2

Linux关闭iptables以及selinux的更多相关文章

  1. Linux分区方式及关闭iptables和selinux的方式

    分区方式一般有三种 第一种:数据不是很重要 /boot(系统的引导分区): 系统引导的信息/软件 系统的内核   200M swap( 交换分区): 为了避免系统内存用光了导致系统 宕机 如果系统内存 ...

  2. Linux关闭防火墙、SELinux

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

  3. (转)关闭iptables和SELinux

    1. 关闭SELinux setenforce 0   #临时关闭 编辑/etc/selinux/config,找到SELINUX 行修改成为:SELINUX=disabled:     #永久关闭, ...

  4. 关闭Linux防火墙(iptables) 及 SELinux

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

  5. linux关闭防火墙及selinux

    RHEL6.5 查看linux防护墙状态: service iptables status 关闭linux防火墙: 1)永久关闭,重启后生效 开启: chkconfig iptables on 关闭: ...

  6. 关闭Linux中的iptables,firewalld,SELINUX

    firewalld 停止firewalld服务 [root@VM_0_13_centos var]# systemctl stop firewalld 或 [root@VM_0_13_centos v ...

  7. RedHat Linux关闭seLinux命令

    Redhat使用了SELinux来增强安全,关闭的办法为: 1. 永久有效 修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然 ...

  8. Linux防火墙(Iptables)的开启与关闭

    Linux防火墙(iptables)的开启与关闭 Linux中的防火墙主要是对iptables的设置和管理. 1. Linux防火墙(Iptables)重启系统生效 开启: chkconfig ipt ...

  9. linux怎么关闭iptables linux如何关闭防火墙

    Linux系统下面自带了防火墙iptables,iptables可以设置很多安全规则.但是如果配置错误很容易导致各种网络问题,那么如果要关闭禁用防火墙怎么操作呢,咗嚛本经验以centos系统为例演示如 ...

随机推荐

  1. Vmware无法正常打开

    VMware的问题 VMware总是搞一些事情,比如隔三差五就打不开了.那么怎么办呢?以前总要把Vm的安装程序重新开始一遍,然后选择修复 但是呢?这样太麻烦了,前几月做web开发的时候接触了Apach ...

  2. 【剑指offer】不分行从上到下打印二叉树,C++实现(层序遍历)

    原创文章,转载请注明出处! 本题牛客网地址 博客文章索引地址 博客文章中代码的github地址 1.题目 从上往下打印出二叉树的每个节点,同层节点从左至右打印.例如: 图  不分行从上往下按层打印二叉 ...

  3. python 生成器推导式与列表推导式的区别

    生成器表达式现用现生成,列表推导式一次性生成静态数据 L = [2, 3, 5, 7] L2 = (x**2+1 for x in L) it = iter(L2) print(next(it)) L ...

  4. phpcms修改增加编辑时摘要自动提取的数量

    \caches\caches_model\caches_data\model_field_1.cache.php 搜索 name="introcude_length" value= ...

  5. day5 io模型

    五种概览:http://www.cnblogs.com/xiehongfeng100/p/4763225.html http://sukai.me/linux-five-io-models/  内有多 ...

  6. js 字符串和数组注意点

    var a="foo"; var b=[ "f","o","o"]; a[1]="o"; b[1]= ...

  7. 如何使用 MSBuild Target(Exec)中的控制台输出

    我曾经写过一篇文章 如何创建一个基于命令行工具的跨平台的 NuGet 工具包,通过编写一个控制台程序来参与编译过程.但是,相比于 基于 Task 的方式,可控制的因素还是太少了. 有没有什么办法能够让 ...

  8. 《DSP using MATLAB》示例9.2

    代码: %% ------------------------------------------------------------------------ %% Output Info about ...

  9. asp.net如何判断服务器上的目录或文件是否存在

    asp.net判断服务器上的目录或文件是否存在!(实例) // ======================================================= [判断文件是否存在] u ...

  10. Cucumber 使用例子

    1. junit 配置 @RunWith(Cucumber.class) @CucumberOptions(format ={"pretty","html:target/ ...