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. UE4中类自动生成代码解析

    本文章由cartzhang编写,转载请注明出处. 所有权利保留. 文章链接:http://blog.csdn.net/cartzhang/article/details/73189272 作者:car ...

  2. 移动端 css 禁止长按屏幕选中

    *{ -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:n ...

  3. 在CentOS 7上安装GitLab

    网上安装gitlab的方法有一堆,由于墙的原因,没有一个能安装成功,最后终于在中文版官网上面找到了RPM包可以下载,进行一键安装: 中文官网地址:http://www.gitlab.cc/ 下载地址为 ...

  4. Delphi格式化函数Format、FormatDateTime和FormatFloat详解

    转自:http://outofmemory.cn/code-snippet/7631/Delphi-format-hua-function-Format-FormatDateTime-FormatFl ...

  5. 如何删除 Windows 10 系统生成的 WindowsApps 文件夹

    如果曾经修改过 Windows 10 应用安装路径到非系统盘,那么那个盘下就会生成一些文件夹.如果以后重装了系统或者应用删除了,挪位置了,那些文件夹依然在那里——删不掉! 大家都知道这是权限问题,然而 ...

  6. 再也不用克隆多个仓库啦!git worktree 一个 git 仓库可以连接多个工作目录

    我在 feature 分支开发得多些,但总时不时被高优先级的 BUG 打断需要临时去 develop 分一个分支出来解 BUG.git 2.6 以上开始提供了 worktree 功能,可以解决这样的问 ...

  7. 《DSP using MATLAB》示例 Example6.7

    代码: M = 32; alpha = (M-1)/2; magHk = [1, 1, 1, 0.5, zeros(1, 25), 0.5, 1, 1]; k1 = 0:15; k2 = 16:M-1 ...

  8. 【EF】EntityFramework 更新数据库字段的三种方法

    实体类 public class TestDbContext : DbContext { public DbSet<Test> Tests { get; set; } public Tes ...

  9. {Reship}{Emgu}{vs2010}C#配置Emgu

    =============================================================================================This Ar ...

  10. .net SMTP 发送邮件

    using System.Net.Mail; public static bool SendMail(string messTo,string messBody) { MailMessage mess ...