溫馨提示×

centos7怎么查看防火墻狀態(tài)

小億
184
2023-08-16 19:32:33
欄目: 編程語言

要查看CentOS 7上的防火墻狀態(tài),可以執(zhí)行以下命令:

  1. 查看防火墻狀態(tài):
sudo systemctl status firewalld
  1. 啟動防火墻:
sudo systemctl start firewalld
  1. 停止防火墻:
sudo systemctl stop firewalld
  1. 重啟防火墻:
sudo systemctl restart firewalld
  1. 設(shè)置防火墻開機自啟:
sudo systemctl enable firewalld
  1. 禁止防火墻開機自啟:
sudo systemctl disable firewalld

請注意,上述命令需要以root或具有sudo權(quán)限的用戶身份執(zhí)行。

0