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. 我也说说Emacs吧(3) - 文件基本操作

    Spacemacs文件基本操作 有了前两讲的积累,我们知道了: 1. 我们既要学习emacs的操作,也要学习vi的操作 2. emacs是一个可扩展的平台,我们并不是从头配置,而是使用一套成熟的集成方 ...

  2. CF 382C

    http://codeforces.com/problemset/problem/382/C 读完题立刻知道怎么做,然后分类讨论到吐血,写挂了,巨蠢 #include <iostream> ...

  3. MFMailComposeViewController发送邮件

    1.iPhone API已经提供了系统写邮件界面的接口,使用MFMailComposeViewController,用来显示界面. 2.项目中需要添加MessageUi.framework.头文件加入 ...

  4. caffe学习5——Model initialization and Model format

    参考文献 1 用Net::Init().做了两件事:一.绑架所有的layers和blobs,调用 layers’SetUp() 函数.验证全部网络的正确性等一系列琐碎的事.二.初始化时给出一些日志信息 ...

  5. docker下的Jenkins安装和体验【转】

    原文地址:http://blog.csdn.net/boling_cavalry/article/details/78942408 作为一款优秀的持续集成工具,jenkins在日常的项目中经常会用到, ...

  6. 【NodeJs】入门笔记一

    忙乎了两周,把一个后台模型项目完成了,整个过程又进步不少,私喜一下. 暂时可以悠闲两天,又一次把node教程拿出来,每次都看一点点,积少成多吧. 查了很多资料,觉得从<Node入门>开始看 ...

  7. lx 与cd 的计算方法

    Candela to lux calculation with distance in meters The illuminance Ev in lux (lx) is equal to the lu ...

  8. ios PageControl and UIScrollView

    // //  AlbumViewController.m //  HwangKop08.18 // //  Created by rimi on 15/8/20. //  Copyright (c) ...

  9. Jmeter查看结果树

    取样结果: Thread Name: test 1-2                                                     线程名称:测试1 - 2Sample S ...

  10. BZOJ2687 交与并/BZOJ2369 区间【决策单调性优化DP】【分治】

    Description 对于一个区间集合 {A1,A2--Ak}(K>1,Ai不等于Aj(i不等于J),定义其权值 S=|A1∪A2∪--AK|*|A1∩A2--∩Ak| 即它们的交区间的长度乘 ...