要查看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權限的用戶身份執行。