centos 7 firewall無法啟動

2022-03-21 17:34:45 字數 1304 閱讀 7420

報錯資訊:

[root@localhost bin]# systemctl status firewalld

● firewalld.service - firewalld - dynamic firewall daemon

loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)

active:failed (result: exit-code) since fri 2019-01-25 02:07:03 est; 4min 25s ago

docs: man:firewalld(1)

process: 2037 execstart=/usr/sbin/firewalld --nofork --nopid $firewalld_args (code=exited, status=127)

main pid: 2037 (code=exited, status=127)

jan 25 02:07:03 localhost.localdomain systemd[1]: starting firewalld - dynamic firewall daemon...

jan 25 02:07:03 localhost.localdomain systemd[1]: firewalld.service: main process exited, code=exited, status=127/n/a

jan 25 02:07:03 localhost.localdomain systemd[1]: failed to start firewalld - dynamic firewall daemon.

jan 25 02:07:03 localhost.localdomain systemd[1]: unit firewalld.service entered failed state.

jan 25 02:07:03 localhost.localdomain systemd[1]: firewalld.service failed.

gogle了一大堆,乙個老兄說python版本不對。我的python確實從2公升到3了

解決辦法

1 檢視firewalld在那個路徑下

which firewalld

2 編輯firewalld檔案

3 將這個宣告,改為你老版本python。

CentOS 7 firewall使用方法

1.在firewall規則中新增80埠 firewall cmd zone public add port 80 tcp permanent 2.獲取firewall狀態資訊 firewall cmd state firewall cmd reload 不改變狀態 firewall cmd comp...

centos7 firewall指定IP與埠訪問

1 啟動防火牆 systemctl start firewalld.service 2 指定ip與埠 firewall cmd permanent add rich rule rule family ipv4 source address 192.168.142.166 port protocol ...

CentOS7 Firewall防火牆常用命令

開啟防火牆systemctl start firewalld.service關閉防火牆systemctl stop firewalld.service檢視防火牆狀態systemctl status firewalld.service開啟開機啟動防火牆systemctl enable firewall...