您現在的位置是:首頁 > 運動

Linux之如何關閉防火牆?

由 流年似水timewentby 發表于 運動2022-02-09
簡介service二、 SLESsudo chkconfig SuSEfirewall2_setup offsudo chkconfig SuSEfirewall2_init offsudo rcSuSEfirewall2 stop三、Unut

如何關掉防火牆的服務

CentOS7(Linux)如何關閉防火牆?

Linux之如何關閉防火牆?

Linux怎麼關閉防火牆

關閉防火牆

零、RHEL 6(CentOS6)

# 臨時關閉防火牆

servcie iptables stop

# 永久關閉防火牆

chkconfig iptables off

一、RHEL 7 (CentOS 7)

# 開機不自動啟動防火牆

sudo systemctl disable firewalld。service

# 關閉防火牆

sudo systemctl stop firewalld。service

二、 SLES

sudo chkconfig SuSEfirewall2_setup off

sudo chkconfig SuSEfirewall2_init off

sudo rcSuSEfirewall2 stop

三、Unutu

sudo service ufw stop

sudo ufw disable

開啟防火牆

零、RHEL 6(CentOS6)

# 臨時開啟防火牆

servcie iptables start

# 永久開啟防火牆

chkconfig iptables on

一、RHEL 7 (CentOS 7)

# 開機自動啟動防火牆

sudo systemctl enable firewalld。service

# 關閉防火牆

sudo systemctl start firewalld。service

# 檢視防火牆狀態

sudo systemctl status firewall。service

# 重新啟動防火牆

sudo systemctl restart firewall。service

二、 SLES

sudo chkconfig SuSEfirewall2_setup on

sudo chkconfig SuSEfirewall2_init on

sudo rcSuSEfirewall2 start

三、Unutu

sudo service ufw start

或者

sudo ufw

RHEL7(CentOS7 啟動關閉服務命令)

啟動一個服務:systemctl start firewalld。service

關閉一個服務:systemctl stop firewalld。service

重啟一個服務:systemctl restart firewalld。service

顯示一個服務的狀態:systemctl status firewalld。service

在開機時啟用一個服務:systemctl enable firewalld。service

在開機時禁用一個服務:systemctl disable firewalld。service

檢視服務是否開機啟動:systemctl is-enabled firewalld。service;echo $?

檢視已啟動的服務列表:systemctl list-unit-files|grep enabled

推薦文章