要查看CentOS 7上的防火墙状态,可以执行以下命令:
sudo systemctl status firewalld
sudo systemctl start firewalld
sudo systemctl stop firewalld
sudo systemctl restart firewalld
sudo systemctl enable firewalld
sudo systemctl disable firewalld
请注意,上述命令需要以root或具有sudo权限的用户身份执行。