ITPub博客

首页 > Linux操作系统 > Linux操作系统 > CentOS7关闭防火墙

CentOS7关闭防火墙

原创 Linux操作系统 作者:Hoegh 时间:2017-11-03 14:10:35 0 删除 编辑
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

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30162081/viewspace-2146786/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2015-03-13

  • 博文量
    132
  • 访问量
    2057938