欢迎光临散文网 会员登陆 & 注册

如何关闭防火墙?

2021-11-16 11:22 作者:Vecloud_  | 我要投稿


CentOS 7.0默认使用的是firewall作为防火墙。 

常用firewall命令点击(此处)折叠或打开 
systemctl stop firewalld.service  #停止firewall 
systemctl disable firewalld.service #禁止firewall开机启动 
firewall-cmd -- state       #查看默认防火墙状态(关闭后显示notrunning,开启后显示running) 
操作示例查看防火墙状态点击(此处)折叠或打开 
[hoegh@localhost Desktop]$ firewall-cmd --state 
running 
关闭防火墙点击(此处)折叠或打开 
[hoegh@localhost Desktop]$ systemctl stop firewalld.service 
PolicyKit daemon disconnected from the bus. 
We are no longer a registered authentication agent. 
PolicyKit daemon reconnected to bus. 
Attempting to re-register as an authentication agent. 
We are now a registered authentication agent. 
[hoegh@localhost Desktop]$ 
[hoegh@localhost Desktop]$ firewall-cmd --state 
not running 
[hoegh@localhost Desktop]$ 
禁止自动启动点击(此处)折叠或打开 
[hoegh@localhost Desktop]$ 
[hoegh@localhost Desktop]$ systemctl disable firewalld.service 
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. 
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service. 
[hoegh@localhost Desktop]$ 
~~~~~~~ the end~~~~~~~~~hoegh2017.11.3 

了解更多网络知识关注:http://www.vecloud.com/

如何关闭防火墙?的评论 (共 条)

分享到微博请遵守国家法律