要查看CentOS 7上的防火墻狀態(tài),可以執(zhí)行以下命令:
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權(quán)限的用戶身份執(zhí)行。