Redhat关闭SELinux和防火墙的办法

简介: Redhat使用了SELinux来增强安全,关闭的办法为: 1. 永久有效 修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然后重启。 2. 即时生效 setenforce 0 关闭防火墙的方法为: 1. 永久性生效 开启:chkconfig iptables on  关闭:chkconfig iptables of
Redhat使用了SELinux来增强安全,关闭的办法为:
1. 永久有效
修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然后重启。
2. 即时生效
setenforce 0

关闭防火墙的方法为:
1. 永久性生效
开启:chkconfig iptables on 
关闭:chkconfig iptables off
2. 即时生效,重启后失效
开启:service iptables start
关闭:service iptables stop 

需要说明的是对于 Linux 下的其它服务都可以用以上命令执行开启和关闭操作

补充:
a. 防火墙还需要关闭ipv6的防火墙:
chkconfig ip6tables off
并且可以通过如下命令查看状态:
chkconfig --list iptables
b. selinux状态可以通过以下命令查看:
sestatus
 

转自:http://blog.chinaunix.net/uid-11582448-id-3157977.html
目录
相关文章
|
8月前
|
Shell 网络安全 Perl
关闭系统防火墙和SELinux
关闭系统防火墙和SELinux
51 1
|
Linux 网络安全
iptables防火墙限制 centos中有 firewalld selinux 还有 iptables
iptables防火墙限制 centos中有 firewalld selinux 还有 iptables
95 0
iptables防火墙限制 centos中有 firewalld selinux 还有 iptables
|
网络协议 Linux 网络安全
|
运维 安全 大数据
【精通Linux系列】Centos7的防火墙及selinux介绍与端口的使用
【精通Linux系列】Centos7的防火墙及selinux介绍与端口的使用
266 0
【精通Linux系列】Centos7的防火墙及selinux介绍与端口的使用
|
Linux 网络安全 数据安全/隐私保护
|
网络协议 Linux 网络安全
Redhat 7 防火墙
systemctl status firewalld -- 查看防火墙状态。  systemctl stop firewalld         -- 临时关闭防火墙命令。重启电脑后,防火墙自动起来。
740 0
|
安全 Linux 网络安全
Redhat关闭SELinux和防火墙的办法(转)
Redhat使用了SELinux来增强安全,关闭的办法为:1. 永久有效修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然后重启。2. 即时生效setenforce 0 关闭防火墙的方法为:1.
859 0