RedHat Enterprise Linux 7 Shutdown Firewall method

Source: Internet
Author: User

The command to turn off a service such as a firewall in a previous release is

Service Iptables Stop

Or

/etc/init.d/iptables stop

Turn off boot:

#chkconfig iptables off


In RHEL7, in fact, there is no such service


[Email protected] ~]# cat/etc/redhat-release

Red Hat Enterprise Linux Server Release 7.1 (MAIPO)

[[Email protected] ~]# service iptables stop

Redirecting To/bin/systemctl Stop Iptables.service

[[email protected] ~]#/etc/init.d/iptables stop

-bash:/etc/init.d/iptables:no such file or directory


Starting with RHEL7, use the Systemctl tool to manage service programs, including services and Chkconfig

Start a service: Systemctl start Firewalld.service

Close a service: Systemctl stop Firewalld.service

Restart a service: Systemctl restart Firewalld.service

Displays the status of a service: Systemctl status Firewalld.service

Enable a service at boot: Systemctl enable Firewalld.service

Disable a service at boot: systemctl disable Firewalld.service

Check to see if the service is booting: Systemctl is-enabled Firewalld.service;echo $?

To view a list of services that have been started: Systemctl List-unit-files|grep enabled


[Email protected] ~]# systemctl List-unit-files|grep enabled

Cups.path enabled

Abrt-ccpp.service enabled

Abrt-oops.service enabled

Abrt-vmcore.service enabled

Abrt-xorg.service enabled

Abrtd.service enabled

Accounts-daemon.service enabled

Atd.service enabled

Auditd.service enabled

Avahi-daemon.service enabled

Bluetooth.service enabled

Chronyd.service enabled

Crond.service enabled

Cups.service enabled

Dbus-org.bluez.service enabled

Dbus-org.fedoraproject.firewalld1.service enabled

Dbus-org.freedesktop.avahi.service enabled

Dbus-org.freedesktop.modemmanager1.service enabled

Dbus-org.freedesktop.networkmanager.service enabled

Dbus-org.freedesktop.nm-dispatcher.service enabled

Display-manager.service enabled

Dmraid-activation.service enabled

Firewalld.service enabled  

Firstboot-graphical.service enabled

Gdm.service enabled

[Email protected] Enabled

Hypervkvpd.service enabled

Hypervvssd.service enabled

Irqbalance.service enabled

Iscsi.service enabled

Ksm.service enabled

Ksmtuned.service enabled

Libstoragemgmt.service enabled

Libvirtd.service enabled

Lvm2-monitor.service enabled

Mdmonitor.service enabled

Microcode.service enabled

Modemmanager.service enabled

Multipathd.service enabled

Networkmanager-dispatcher.service enabled

Networkmanager.service enabled

Nfs-lock.service enabled

Packagekit-offline-update.service enabled

Postfix.service enabled

Rhsmcertd.service enabled

Rngd.service enabled

Rpcbind.service enabled

Rsyslog.service enabled

Rtkit-daemon.service enabled

Smartd.service enabled

Spice-vdagentd.service enabled

Sshd.service enabled

Sysstat.service enabled

Systemd-readahead-collect.service enabled

Systemd-readahead-drop.service enabled

Systemd-readahead-replay.service enabled

Tuned.service enabled

Vmtoolsd.service enabled

Avahi-daemon.socket enabled

Cups.socket enabled

Dm-event.socket enabled

Iscsid.socket enabled

Iscsiuio.socket enabled

Lvm2-lvmetad.socket enabled

Rpcbind.socket enabled

Default.target enabled

Graphical.target enabled

Nfs.target enabled

Remote-fs.target enabled


To disable the firewall:

[Email protected] ~]# Systemctl stop Firewalld.service

[Email protected] ~]# systemctl disable Firewalld.service

[Email protected] ~]# systemctl status Firewalld.service

firewalld.service–firewalld–dynamic Firewall daemon

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

Active:inactive (Dead)


Jul 22:25:43 rhel7 systemd[1]: Started firewalld–dynamic firewall daemon.

Jul 22:43:29 Rhel7 systemd[1]: Stopping firewalld–dynamic firewall daemon ...

Jul 22:43:29 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.

Jul 22:44:14 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.

Jul 22:44:15 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.

Jul 22:44:19 Rhel7 systemd[1]: Starting firewalld–dynamic Firewall daemon ...

Jul 22:44:19 rhel7 systemd[1]: Started firewalld–dynamic firewall daemon.

Jul 22:44:21 Rhel7 systemd[1]: Stopping firewalld–dynamic firewall daemon ...

Jul 22:44:21 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.

Jul 22:44:32 rhel7 systemd[1]: Stopped firewalld–dynamic firewall daemon.


This article is from the "Linux Advanced Ops Home" blog, so be sure to keep this source http://docker110.blog.51cto.com/6579145/1719470

RedHat Enterprise Linux 7 Shutdown Firewall method

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.