CentOS7關閉防火牆方法
在之前的版本中關閉防火牆等服務的命令是
service iptables stop
/etc/init.d/iptables stop
在RHEL7中,其實沒有這個服務
[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
原來在RHEL7開始,使用systemctl工具來管理服務程式,包括了service和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
禁用防火牆
[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.
啟動一個服務: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
在RHEL7中,其實沒有這個服務
[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
原來在RHEL7開始,使用systemctl工具來管理服務程式,包括了service和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
禁用防火牆
[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.
啟動一個服務: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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-2131938/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- centos7關閉防火牆命令 centos7永久防火牆關閉CentOS防火牆
- CentOS7關閉防火牆CentOS防火牆
- Centos7 關閉防火牆CentOS防火牆
- Centos7設定關閉防火牆CentOS防火牆
- win10關閉防火牆方法_w10如何關閉防火牆Win10防火牆
- CentOS7檢視和關閉防火牆CentOS防火牆
- centos7怎麼永久關閉防火牆CentOS防火牆
- win10怎麼關閉防火牆 win10關閉防火牆的方法Win10防火牆
- ubuntu 關閉防火牆命令 ubuntu怎樣關閉防火牆Ubuntu防火牆
- Linux 7關閉防火牆方法Linux防火牆
- CentOS關閉防火牆CentOS防火牆
- OpenSUSE關閉防火牆防火牆
- Win10系統如何關閉防火牆_win10防火牆徹底關閉方法Win10防火牆
- 怎麼關閉防火牆win10_win10防火牆徹底關閉操作方法防火牆Win10
- win10如何關閉域防火牆_win10域網路防火牆關閉方法Win10防火牆
- win10關閉防火牆提示怎麼關閉_win10關閉防火牆提示徹底關閉操作方法Win10防火牆
- win10關防火牆方法_如何關閉win10自帶防火牆Win10防火牆
- CentOS7使用firewalld開啟關閉防火牆與埠CentOS防火牆
- win10關閉防火牆服務方法_win10防火牆怎麼關閉服務Win10防火牆
- CentOS 7關閉防火牆CentOS防火牆
- 關閉centos的防火牆CentOS防火牆
- linux 關閉防火牆Linux防火牆
- linux關閉防火牆命令 linux防火牆關閉和開啟命令Linux防火牆
- centos7怎麼檢視、開啟和關閉防火牆CentOS防火牆
- Linux中關閉防火牆Linux防火牆
- linux關閉防火牆命令是什麼 linux永久關閉防火牆命令分享Linux防火牆
- win10系統如何關閉邁克菲防火牆_win10邁克菲防火牆的關閉方法Win10防火牆
- win10如何關閉啟用防火牆通知_win10關閉啟動防火牆通知的設定方法Win10防火牆
- win10防火牆如何關閉 筆記本win10防火牆強制關閉Win10防火牆筆記
- Win10系統防火牆怎麼關閉 win10防火牆在哪裡關閉Win10防火牆
- ubuntu 開啟/關閉ubuntu防火牆Ubuntu防火牆
- 【OS】Linux如何關閉防火牆Linux防火牆
- SElinux以及防火牆的關閉Linux防火牆
- win10防火牆關閉提醒如何操作 win10怎麼關閉防火牆提醒通知Win10防火牆
- win10怎麼關閉防毒軟體和防火牆 win10自帶防毒防火牆永久關閉操作方法Win10防毒防火牆
- CentOS8檢視防火牆狀態,開啟/關閉防火牆CentOS防火牆
- win10怎麼關閉防火牆 電腦防火牆在哪裡設定關閉win10Win10防火牆
- win10防火牆在哪關_w10系統怎麼關閉防火牆Win10防火牆