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

What are the ways for CentOS7 to turn off the firewall?

2025-02-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly shows you "what are the methods for CentOS7 to close the firewall", the content is simple and clear, and I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "what are the ways to shut down the firewall in CentOS7?"

In previous versions, the command to turn off services such as firewalls is

Service iptables stop

/ etc/init.d/iptables stop

In RHEL7, there is no such service.

[root@rhel7 ~] # cat / etc/redhat-release

Red Hat Enterprise Linux Server release 7.0 (Maipo)

[root@rhel7 ~] # service iptables stop

Redirecting to / bin/systemctl stop iptables.service

[root@rhel7 ~] # / etc/init.d/iptables stop

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

Originally in RHEL7, systemctl tools were used to manage service programs, including service and chkconfig

[root@rhel7 ~] # 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

Getty@.service 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

Disable the firewall

[root@rhel7 ~] # systemctl stop firewalld.service

[root@rhel7 ~] # systemctl disable firewalld.service

[root@rhel7 ~] # systemctl status firewalld.service

Firewalld.service-firewalld-dynamic firewall daemon

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

Active: inactive (dead)

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

Jul 29 22:43:29 rhel7 systemd [1]: Stopping firewalld-dynamic firewall daemon

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

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

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

Jul 29 22:44:19 rhel7 systemd [1]: Starting firewalld-dynamic firewall daemon

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

Jul 29 22:44:21 rhel7 systemd [1]: Stopping firewalld-dynamic firewall daemon

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

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

Start a service: systemctl start firewalld.service

Shut down 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 time: systemctl enable firewalld.service

Disable one service at boot time: systemctl disable firewalld.service

Check to see if the service starts up: systemctl is-enabled firewalld.service;echo $?

View the list of started services: systemctl list-unit-files | grep enabled

The above is all the contents of the article "what are the ways to turn off the firewall in CentOS7?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Servers

Wechat

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

12
Report