Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to turn off firewalld and SElinux in RHEL7

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to close firewalld and SElinux in RHEL7, for this problem, this article details the corresponding analysis and solution, hoping to help more small partners who want to solve this problem find a simpler and easier way.

1. Close firealld firewall

a. Check the firewall status first

[root@bogon ~]# systemctl status firewalld

--------------------------------------------------------------------------

|firewalld.service - firewalld - dynamic firewall daemon

Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)

Active: active (running) since 2015-05-25 22:53:54 CST; 3min 18s ago

Main PID: 979 (firewalld)

CGroup: /system.slice/firewalld.service

└─979 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

May 25 22:53:54 localhost.localdomain systemd[1]: Started firewalld -dynamic...

Hint: Some lines were ellipsized, use -l to show in full.|

b. Close firealld firewall

[root@bogon ~]# systemctl stop firewall//stop firewall

c. Check whether the firewall service is started.

[root@bogon ~]# systemctl is-enabled firewalld

enabled #Open

d. Turn off the firewall and start up.

[root@bogon ~]# systemctl disable firewalld

rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service' //Delete

rm '/etc/systemd/system/basic.target.wants/firewalld.service' //delete

[root@bogon ~]# systemctl is-enabled firewalld

disabled //closed

2. Close SELinux

1. Check the current SELinux status

[root@bogon ~]# getenforce

Results: Enforcement

2. Close SELinux

[root@bogon ~]# setenforce 0

[root@bogon ~]# getenforce

Results: Permissive

3. edit the configuration file

[root@bogon ~]# vim /etc/selinux/config

Results:

#This file controls the state of SELinux on the system.

#SELINUX= can take one of these three values:

#enforcing - SELinux security policy is enforced.

#permissive - SELinux prints warnings instead of enforcing.

#disabled - No SELinux policy is loaded.

SELINUX=permissive **#Modify this parameter **

#SELINUXTYPE= can take one of three two values:

#targeted - Targeted processes are protected,

#minimum - Modification of targeted policy. Only selected processes are protected.

#mls - Multi Level Security protection.

SELINUXTYPE=targeted

About RHEL7 how to close firewalld and SElinux questions to share the answer here, I hope the above content can be of some help to everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report