温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

CentOS7关闭防火墙

发布时间:2020-08-05 04:56:12 来源:ITPUB博客 阅读:282 作者:Hoegh 栏目:建站服务器
CentOS 7.0默认使用的是firewall作为防火墙。

常用firewall命令

点击(此处)折叠或打开

  1. systemctl stop firewalld.service    #停止firewall
  2. systemctl disable firewalld.service #禁止firewall开机启动
  3. firewall-cmd -- state               #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

操作示例

查看防火墙状态

点击(此处)折叠或打开

  1. [hoegh@localhost Desktop]$ firewall-cmd --state
  2. running

关闭防火墙

点击(此处)折叠或打开

  1. [hoegh@localhost Desktop]$ systemctl stop firewalld.service
  2. PolicyKit daemon disconnected from the bus.
  3. We are no longer a registered authentication agent.
  4. PolicyKit daemon reconnected to bus.
  5. Attempting to re-register as an authentication agent.
  6. We are now a registered authentication agent.
  7. [hoegh@localhost Desktop]$
  8. [hoegh@localhost Desktop]$ firewall-cmd --state
  9. not running
  10. [hoegh@localhost Desktop]$

禁止自动启动

点击(此处)折叠或打开

  1. [hoegh@localhost Desktop]$
  2. [hoegh@localhost Desktop]$ systemctl disable firewalld.service
  3. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
  4. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
  5. [hoegh@localhost Desktop]$

~~~~~~~ the end~~~~~~~~~
hoegh
2017.11.3

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI