1. 程式人生 > >Linux 重啟防火牆失敗

Linux 重啟防火牆失敗

CentOS 7 執行service iptables start出現redirecting to systemctl ...Failed to ...not loaded.

如果出現以下錯誤,好像說的是 版本高了,需要採用其他方式了

systemctl restart.service

其注意一下;systemctl restart.service 需要進行安裝 

知識來源於:https://www.jianshu.com/p/de069a89c4b8

1. 使用systemctl

systemctl [start|stop|restart|save|status] iptables.service

2. 安裝iptables-services

切換到root使用者下,執行:

yum install iptables-services
systemctl enable iptables.service //設定開機啟動

之後就可以使用以下指令了:

service iptables [start|stop|restart|save|status]



作者:adXiang
連結:https://www.jianshu.com/p/de069a89c4b8
來源:簡書
簡書著作權歸作者所有,任何形式的轉載都請聯絡作者獲得授權並註明出處。