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. ios 10.3下载 Xcode8配置支持 ios 10.3下载

    一不小心,手机又升级了,哎

  2. caffe学习记录2——blobs

    参考:caffe官网  2016-01-23 10:08:22 1 blobs,layers,nets是caffe模型的骨架 2 blobs是作者写好的数据存储的“容器”,可以有效实现CPU和GPU之 ...

  3. 【剑指offer】二叉搜索树转双向链表,C++实现

    原创博文,转载请注明出处! # 题目 输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表.要求不能创建任何新的结点,只能调整树中结点指针的指向. 二叉树节点的定义 struct TreeNod ...

  4. nginx在使用proxy_pass的情况下开启error_page

    error_page用于指定特定错误发生时要显示的url,但是如果请求经proxy_pass处理后,如何使error_page对upstream产生的错误进行处理呢? 方法很简单. 保持之前的erro ...

  5. 安装hadoop 2.2.0

    安装环境为 CentOS 64位系统, 大概分下面几个步奏, 0. 安装JDK1. 配置SSH2. 配置/etc/hosts3. 拷贝hadoop包到没台机器上4. 修改hadoop配置文件5. 关闭 ...

  6. 如何快速编写和调试 Emit 生成 IL 的代码

    .NET Core/.NET Framework 的 System.Reflection.Emit 命名空间为我们提供了动态生成 IL 代码的能力.利用这项能力,我们能够在运行时生成一段代码/一个方法 ...

  7. 51nod 1347 旋转字符串

    S[0...n-1]是一个长度为n的字符串,定义旋转函数Left(S)=S[1…n-1]+S[0].比如S=”abcd”,Left(S)=”bcda”.一个串是对串当且仅当这个串长度为偶数,前半段和后 ...

  8. You're Given a String...

    You're given a string of lower-case Latin letters. Your task is to find the length of its longest su ...

  9. Flask第五篇——设置debug模式

    flask默认是没有开启debug模式的,开启debug模式有很多好处: 第一,可以帮助我们查找代码里面的错误,比如: # coding: utf-8 from flask import Flask ...

  10. timequest 中set input delay set output delay 的使用

    set_input_delay/ set_output_delay TimeQuest出现以后,随之 set input delay 与 set output delay 也跟着出现,该约束命令用“外 ...