Fork me on GitHub

centos7 中如何查看、打开、关闭防火墙

一、临时开启,关闭防火墙

1、查看防火墙状态

 systemctl status firewalld

2、开启防火墙

systemctl stop firewalld

3、关闭防火墙

systemctl stop firewalld

通过status查看状态,绿色的active (running)则表示防火墙在运行中,inactive (dead)则表示防火墙关闭

二、永久开启,关闭防火墙

1、开机自启动防火墙

systemctl enable firewalld

2、开机自动关闭防火墙(开机不自启动防火墙)

systemctl disable firewalld

 

posted @ 2021-06-04 11:17  Alex-Lzy  阅读(517)  评论(0编辑  收藏  举报