Redhat关闭SELinux和防火墙的办法(转)

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

时间: 2024-08-28 18:28:22

Redhat关闭SELinux和防火墙的办法(转)的相关文章

永久关闭selinux | 防火墙

关闭SELinux的两种方法 1 永久方法 – 需要重启服务器 修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器. 2 临时方法 – 设置系统参数 使用命令setenforce 0 附:setenforce 1 设置SELinux 成为enforcing模式setenforce 0 设置SELinux 成为permissive模式 谢谢! Centos7 关闭防火墙 CentOS 7.0默认使用的是firewall作为防火墙,使用iptabl

linux初始化配置---主机名、关闭防火墙、关闭selinux

一.修改主机名 1.零时修改 [[email protected] network-scripts]# hostname jw07 然后就可以看到我们的主机名被修改了 2.永久修改主机名 [[email protected] /]# hostnamectl set-hostname liutao 重启centos就可以看到更改了 二.如何关闭centos的防火墙 1.零时关闭 [[email protected] ~]# systemctl stop  firewalld.service 我们可

SElinux以及防火墙的关闭

[[email protected] targeted]# pwd/etc/selinux/targeted[[email protected] targeted]# getsebool -a|grep sambasamba_create_home_dirs --> offsamba_domain_controller --> offsamba_enable_home_dirs --> offsamba_export_all_ro --> offsamba_export_all_r

Linux selinux关闭方法和防火墙关闭方法

在Linux下设置selinux有三种方法.一.在图形界面中:    桌面-->管理-->安全级别和防火墙,设置为disable.二.在命令模式下:    修改文件:/etc/selinux/config,然后重启系统.具体修改如图: 三.运行命令:setup,进入"防火墙配置",在selinux栏,选择"禁用".四.运行命令:setenforce 0,(不需要重启).    关闭selinux对指定服务的保护(以ftp为例):       1.使用命令

网络相关概念 ,修改IP ,防火墙与端口-关闭Selinux

en表示以太网 , 就是局域网 O:主板板载网 P: 独立网卡 S: 热插拔网卡 临时修改IP    ifconfig  网卡名称(ens33)  IP(192.168.1.110) systemctl restart network //重启网卡服务 ifconfig  网卡名称(ens33)  del IP(192.168.1.110) //临时删除 永久修改IP systemctl status NetworkManager    #网卡状态      active(running)   

rhel7的基本操作(查看IP配置,关闭防火墙,临时或永久关闭selinux,常用命令操作)

* rhel7的基本操作* 1.查看IP配置[[email protected] ~]# ls /etc/sysconfig/network-scripts/ifcfg-enp0s25 /etc/sysconfig/network-scripts/ifcfg-enp0s25查看DNS配置[[email protected] ~]# cat /etc/resolv.conf Generated by NetworkManager nameserver 114.114.114.114查看IP和主机绑

如何关闭SeLinux

禁用SELINUX #vi /etc/selinux/config  让SELINUX失效,执行如下命令: #setenforce 0 注:setenforce是Linux的selinux防火墙配置命令 执行setenforce 0 表示关闭selinux防火墙.     setenforce命令是单词set(设置)和enforce(执行)连写,另一个命令getenforce可查看selinux的状态.

关闭selinux知识小结

今天有人问我,哎,福星,关闭selinux这块我还有点蒙,能给我分析分析么? selinux是什么? 1.     我的简单理解:selinux是一套安全的机制,在学习环境下建议关闭,功能方面可以一些机制所替代.比如防火墙等系列安全措施 selinux一定要关闭么? 1.     没有基础又不愿意倘坑的小伙伴可以关闭,工作中环境大都不开启 2.     开启的坏处是使用中需要倘很多的坑,如果有面对困难的勇气,那就别管它 修改selinux运行状态的相关 setenforce  1 | 0    

开启、关闭selinux

selinux是NSA对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统.但正是因为功能太强大,导致很多时候工作不方便进行,所以有些情况需要关闭selinux. selinux下有两个重要的文件/etc/sysconfig/selinux 和 /etc/selinux/config /etc/sysconfig/selinux是/etc/selinux/config文件的软连接 查看selinux状态命令 disabled为关闭 enbledw为开启 下面两个命令功能相同 [[em