博主头像
Cool

行动起来,活在当下

  • 累计撰写 263 篇文章
  • 累计创建 159 个标签
  • 累计收到 0 条评论

目录

学习笔记

怎么永久关闭或开启linux防火墙

怎么永久关闭或开启linux防火墙

{message type="info" content="版本: Centos 7.9"/}

1 查看防火墙状态

systemctl status firewalld.service

2、然后在下方可度以查看得到“active(running)”,此时说明防火墙已经被打开了。

3 关闭防火墙

systemctl stop firewalld.service

4、然后再使用命令systemctl status firewalld.service,在下方出现disavtive(dead),这权样就说明防火墙已经关闭。

永久关闭防火墙

再在命令行中输入命令“systemctl disable firewalld.service”命令,即可永久关闭防火墙。

systemctl disable firewalld.service

{mtitle title="开启防火墙"/}

开启防火墙

systemctl start firewalld.service

永久开启防火墙

systemctl enable firewalld.service

{message type="warning" content="永久开启或关闭之前 都要在已经开启或关闭状态下才生效"/}

那年今日12 月 4 日

    评论区