美文网首页
CentOs7下关闭和重启防火墙

CentOs7下关闭和重启防火墙

作者: advanced_slowly | 来源:发表于2019-09-29 17:56 被阅读0次

前言

本文记录一下之前苦苦搜寻此问题的答案。对于不同版本打开和关闭防火墙的命令是不一样的。

查看防火墙的状态

[zhihua@localhost ~]$ firewall-cmd --state

然后呢显示结果不是not running就是running。我的已经关闭了防火墙所以显示not running.

检查防火墙的状态

[root@localhost zhihua]# systemctl list-unit-files|grep firewalld.service

然后显示firewalld.service disabled

关闭防火墙

##停止防火墙
[zhihua@localhost ~]$ sudo systemctl stop firewalld.service
##停止防火墙也可以这样
[zhihua@localhost ~]$ sudo systemctl stop firewalld
##禁止firewall开机启动
[zhihua@localhost ~]$ sudo systemctl disable firewalld.service

重启防火墙

##重启防火墙
[zhihua@localhost ~]$sudo systemctl start firewalld
##或者
[zhihua@localhost ~]$sudo systemctl restart firewalld

相关文章

  • linux命令

    centos7启动防火墙 centos7停止防火墙/关闭防火墙 centos7重启防火墙 注意:新增/删除操作需要...

  • Centos7防火墙

    Centos7 firewall 命令: 查看已经开放的端口 开启端口 重启防火墙 关闭防火墙 iptables ...

  • CentOS7 防火墙配置

    CentOS7防火墙配置 查看防火墙的服务状态 查看防火墙的状态 开启、重启、关闭、firewalld.servi...

  • [rhel7] 2. 关闭防火墙

    关闭防火墙,并设置开机自动关闭 查看防火墙服务运行状态 临时关闭防火墙,重启后丢失。 为了验证,重启一下试试重启命...

  • 防火墙和Selinux

    1. 查看防火墙运行状态 2. 防火墙的 开启|关闭|重启 3. centos7 防火墙设置 开机启动和开机不启动...

  • Centos6中防火墙设置与端口开放的方法

    打开/关闭/重启防火墙 开启防火墙(重启后永久有效):chkconfig iptables on 关闭防火墙(重启...

  • Linux使用-FAQ

    CentOS7 关闭防火墙 参考:CentOS7 关闭防火墙 在我的虚拟机下启动服务 进程管理 文件管理 查看日志...

  • linux常用操作命令

    centos7一下的系统防火墙设置: 关闭命令:service iptables stop 永久关闭防火墙:chk...

  • usage: see firewall-cmd man page

    linux centos7 默认防火墙是关闭的,设置了开启端口后一定要重启防火墙,否则端口开启会不起作用 查看已...

  • CentOS防火墙之iptables

    1、查看防火墙状态 2、启动防火墙 3、停止防火墙 4、重启防火墙 5、永久关闭防火墙 6、永久关闭后重启 7、开...

网友评论

      本文标题:CentOs7下关闭和重启防火墙

      本文链接:https://www.haomeiwen.com/subject/drluyctx.html