新闻资讯

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻资讯列表

centos7如何查看防火墙状态,centos7如何查看版本

发布时间:2023-08-18 08:00:14

centos7如何查看防火墙状态

要查看CentOS 7上的防火墙状态,可以履行以下命令:
1. 查看防火墙状态:
```shell
sudo systemctl status firewalld
```
2. 启动防火墙:
```shell
sudo systemctl start firewalld
```
3. 停止防火墙:
```shell
sudo systemctl stop firewalld
```
4. 重启防火墙:
```shell
sudo systemctl restart firewalld
```
5. 设置防火墙开机自启:
```shell
sudo systemctl enable firewalld
```
6. 制止防火墙开机自启:
```shell
sudo systemctl disable firewalld
```
请注意,上述命令需要以root或具有sudo权限的用户身份履行。