溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

CentOS7關(guān)閉防火墻

發(fā)布時間:2020-08-05 04:56:12 來源:ITPUB博客 閱讀:292 作者:Hoegh 欄目:建站服務(wù)器
CentOS 7.0默認(rèn)使用的是firewall作為防火墻。

常用firewall命令

點擊(此處)折疊或打開

  1. systemctl stop firewalld.service    #停止firewall
  2. systemctl disable firewalld.service #禁止firewall開機啟動
  3. firewall-cmd -- state               #查看默認(rèn)防火墻狀態(tài)(關(guān)閉后顯示notrunning,開啟后顯示running)

操作示例

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

點擊(此處)折疊或打開

  1. [hoegh@localhost Desktop]$ firewall-cmd --state
  2. running

關(guān)閉防火墻

點擊(此處)折疊或打開

  1. [hoegh@localhost Desktop]$ systemctl stop firewalld.service
  2. PolicyKit daemon disconnected from the bus.
  3. We are no longer a registered authentication agent.
  4. PolicyKit daemon reconnected to bus.
  5. Attempting to re-register as an authentication agent.
  6. We are now a registered authentication agent.
  7. [hoegh@localhost Desktop]$
  8. [hoegh@localhost Desktop]$ firewall-cmd --state
  9. not running
  10. [hoegh@localhost Desktop]$

禁止自動啟動

點擊(此處)折疊或打開

  1. [hoegh@localhost Desktop]$
  2. [hoegh@localhost Desktop]$ systemctl disable firewalld.service
  3. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
  4. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
  5. [hoegh@localhost Desktop]$

~~~~~~~ the end~~~~~~~~~
hoegh
2017.11.3

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI