要查看CentOS系统的防火墙状态,可以使用以下命令:
1. 查看防火墙状态:
```
sudo systemctl status firewalld
```
2. 启动防火墙:
```
sudo systemctl start firewalld
```
3. 停止防火墙:
```
sudo systemctl stop firewalld
```
4. 重启防火墙:
```
sudo systemctl restart firewalld
```
5. 设置防火墙开机自启动:
```
sudo systemctl enable firewalld
```
6. 禁止防火墙开机自启动:
```
sudo systemctl disable firewalld
```
注意:上述命令需要以root权限或使用sudo执行。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:centos如何查看防火墙状态