RedHat Enterprise Linux 7关闭防火墙方法

CentOS7关闭防火墙方法

在事先的版本中关闭防火墙等劳动的授命是

service iptables stop

/etc/init.d/iptables stop

在TucsonHEL7中,其实远非那几个服务

[[email protected]
~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (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

本来在奥迪Q5HEL7最早,使用systemctl工具来保管服务程序,饱含了service和chkconfig

[[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

剥夺防火墙

[[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 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.

最早一个劳务:systemctl start firewalld.service
关门三个服务:systemctl stop firewalld.service
重启贰个劳动:systemctl restart firewalld.service
体现二个劳务的景况:systemctl status firewalld.service
在开机时启用三个劳务:systemctl enable firewalld.service
在开机时禁止使用叁个劳务:systemctl disable firewalld.service
查阅服务是不是开机运转:systemctl is-enabled firewalld.service;echo $?
翻开已运维的服务列表:systemctl list-unit-files|grep enabled

在前头的版本中关闭防火墙等劳务的命令是 service iptables stop
/etc/init.d/iptables stop 在科雷傲HEL7中,其实未有那个服务
[[email protected]

 

相关文章