1. 程式人生 > >centos7 操作防火牆

centos7 操作防火牆

操作預設防火牆firewalld

1.//臨時關閉    systemctl stop firewalld    //禁止開機啟動    systemctl disable firewalld    Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.    Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

2.systemctl是CentOS7的服務管理工具中主要的工具,它融合之前service和chkconfig的功能於一體。

啟動一個服務: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 檢視已啟動的服務列表:systemctl list-unit-files|grep enabled 檢視啟動失敗的服務列表:systemctl --failed