×
新网 > 虚机资讯 > 正文

CentOS7关闭防火墙

  • 作者:zccc
  • 来源:网络
  • 2020-08-05 06:01:55

建站服务器 CentOS 7.0默认使用的是firewall作为防火墙。 常用firewall命令 点击(此处)折叠或打开 sy

建站服务器 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~~~~~~~~~
hoegh
2017.11.3

新网虚拟主机

  • 相关专题

免责声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,也不承认相关法律责任。如果您发现本社区中有涉嫌抄袭的内容,请发送邮件至:operations@xinnet.com进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

免费咨询获取折扣

Loading