1. 程式人生 > 其它 >Centos7 怎麼永久關閉防火牆

Centos7 怎麼永久關閉防火牆

1、連線到centos主機,然後輸入命令“systemctl status firewalld.service”並按下回車鍵。

2、然後在下方可以檢視得到 “ active(running)”,此時說明防火牆已經打開了。

3、在命令列中輸入systemctl stop firewalld.service命令,進行關閉防火牆。

4、然後再使用命令systemctl status firewalld.service,在下方出現disavtive(dead),這樣就說明防火牆已經關閉。

5、再在命令列中輸入命令“systemctl disable firewalld.service”命令,即可永久關閉防火牆。

6、防火牆常用命令

檢視防火牆的狀態的命令為:sudo systemctl status firewalld

開啟防火牆的方式有兩種,一種是開啟後重啟會恢復回原來的狀態,命令為:sudo systemctl start firewalld

另一種是開啟後重啟不會恢復到原來的狀態,命令為:sudo systemctl enable firewalld,這種方式輸入命令後要重啟系統才會生效。

關閉防火牆的方式也有兩種,和開啟相對應,命令分別為

sudo systemctl stop firewalld

sudo systemctl disable firewalld。

感謝:

https://zhidao.baidu.com/question/650468069520595005.html