CentOS7怎么查看和关闭防火墙firewalld服务

2024-10-29 19:24:29

1、查看确认版本如下图查看查看centos版本号,centos7的防火墙和centos6操作方法不一样。

CentOS7怎么查看和关闭防火墙firewalld服务

2、centos7防火墙提供了firewall-cmd命令,可以通过--help查看详细说明。

CentOS7怎么查看和关闭防火墙firewalld服务

3、防火墙状态输入firewall-cmd --state可以查看防火墙状态, 如图表示正在运行。

CentOS7怎么查看和关闭防火墙firewalld服务

4、查看防火墙所有的规则详情,firewall-cmd --list-all 。若提示下图信息,红色表示没有启动防火墙服务。

CentOS7怎么查看和关闭防火墙firewalld服务CentOS7怎么查看和关闭防火墙firewalld服务

5、centos7查看防火墙状态,可通过查看服务。systemctl status firewalld查看

CentOS7怎么查看和关闭防火墙firewalld服务

6、centos7关闭防火墙如果要关闭防火墙,输入systemctl stop firewalld即可关闭服务。(开机重启会自动启动)

CentOS7怎么查看和关闭防火墙firewalld服务

7、禁用防火墙开机启动,命令操作 systemctl disable firewalld.service 重启之后,不会自动启动。

CentOS7怎么查看和关闭防火墙firewalld服务
猜你喜欢