CentOS7关闭防火墙

建站服务器

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

更多关于云服务器域名注册虚拟主机的问题,请访问西部数码官网:www.west.cn

赞(0)
声明:本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-62778877-8306;邮箱:fanjiao@west.cn。本站原创内容未经允许不得转载,或转载时需注明出处:西部数码知识库 » CentOS7关闭防火墙

登录

找回密码

注册