Red Hat Enterprise Linux 7 shuts down firewall and SELinux

Source: Internet
Author: User

Red Hat Enterprise Linux 7 shuts down firewall and SELinux

First, close the firewall

1. View the firewall status first

[Email protected] ~]#systemctl status Firewalld

firewalld.service-firewalld-dynamic Firewall daemon

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

Active:active (running) since three 2017-10-11 15:31:32 CST; 2min 20s ago

Main pid:809 (FIREWALLD)

CGroup:/system.slice/firewalld.service

└─809/usr/bin/python-es/usr/sbin/firewalld--nofork--nopid

October 15:32:32 db1 systemd[1]: Started firewalld-dynamic firewall daemon.


2. Turn off the firewall

[Email protected] ~]#systemctl stop Firewalld

[Email protected] Desktop]# systemctl status Firewalld

firewalld.service-firewalld-dynamic Firewall daemon

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

Active:inactive (Dead)


October 23:31:18 DB1 systemd[1]: Starting firewalld-dynamic Firewall Dae .....

October 15:31:32 db1 systemd[1]: Started firewalld-dynamic firewall daemon.

October 15:34:54 db1 systemd[1]: Stopping firewalld-dynamic Firewall dae .....

October 15:34:55 db1 systemd[1]: Stopped firewalld-dynamic firewall daemon.


3. Check if the Firewall service is booting

[Email protected] ~]#systemctl is-enabled firewalld

Enabled #开启


4. Turn off the firewall boot

[Email protected] ~]#systemctl disable FIREWALLD

RM '/etc/systemd/system/dbus-org.fedoraproject.firewalld1.service '

RM '/etc/systemd/system/basic.target.wants/firewalld.service '

[Email protected] ~]#systemctl is-enabled firewalld

Disabled


Second, to close SELinux

1. View current SELinux status

[Email protected] ~]#getenforce

Enforcing


2. Turn off SELinux

[Email protected] ~]# getenforce 0

[Email protected] ~]# getenforce

Permissive


3. Edit the configuration file

[Email protected] ~]#vim/etc/selinux/config

# This file controls the state of the 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 #修改此参数

# selinuxtype= can take one of three the values:

# targeted-targeted processes is protected,

# Minimum-modification of targeted policy. Only selected processes is protected.

# Mls-multi level Security protection.

selinuxtype=targeted


This article is from the "Flower Asahi Blog" blog, please be sure to keep this source http://huazhixu123.blog.51cto.com/1591874/1971452

Red Hat Enterprise Linux 7 shuts down firewall and SELinux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.