如何在 Centos 7 上启用防火墙?
How to enable firewall on Centos 7?
我的防火墙目前处于非活动状态。
# systemctl status firewalld
firewalld.service
Loaded: masked (/dev/null)
Active: inactive (dead)
我使用以下命令启用了防火墙
$systemctl unmask firewalld
但我遇到了这个错误
# systemctl unmask firewalld
Failed to issue method call: Access denied
请指教。
提前致谢!
试试这个:
sudo systemctl restart firewalld
sudo systemctl enable firewalld
但在您安装 firewalld
之前。您可以为此使用 yum
:
sudo yum install firewalld
试试这个:
systemctl unmask firewalld
return: Removed symlink /etc/systemd/system/firewalld.service.
之后,您可以:
systemctl restart firewalld
我的防火墙目前处于非活动状态。
# systemctl status firewalld
firewalld.service
Loaded: masked (/dev/null)
Active: inactive (dead)
我使用以下命令启用了防火墙
$systemctl unmask firewalld
但我遇到了这个错误
# systemctl unmask firewalld
Failed to issue method call: Access denied
请指教。
提前致谢!
试试这个:
sudo systemctl restart firewalld
sudo systemctl enable firewalld
但在您安装 firewalld
之前。您可以为此使用 yum
:
sudo yum install firewalld
试试这个:
systemctl unmask firewalld
return: Removed symlink /etc/systemd/system/firewalld.service.
之后,您可以:
systemctl restart firewalld