centos ubuntu 查看防火牆狀態,關閉防火牆命令

linux在遠程鏈接數據庫等操做的時候須要關閉防火牆,而不一樣的Linux發行版本相關命令是不同的。下面就我手頭有的幾個系統,記錄一下他們的相關命令linux

centos6.8數據庫

 

查看防火牆狀態:ubuntu

service iptables statuscentos

關閉防火牆:centos7

service iptables stopspa

打開防火牆:blog

service iptables startip

圖示:cmd

 

 

 

centos7.0以及7.5:table

查看防火牆狀態:

firewall-cmd --state

關閉防火牆:

systemctl stop firewalld

打開防火牆:

systemctl start firewalld

圖示:

 

 

 

 

 

ubuntu18.04

查看防火牆狀態:

ufw status

關閉防火牆:

ufw disable

打開防火牆:

ufw enable

圖示:

相關文章
相關標籤/搜索