Centos7執行”service iptables save”錯誤提示的解決方法

在centos7中用iptables命令配置完策略規則后,需要保存策略永久生效,執行service iptables save時提示:

# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

的錯誤信息的解決方法:

1、先執行如下命令:

systemctl stop firewalld
systemctl mask firewalld

2、安裝iptables services

yum install iptables-services

3、設置開機啟動

systemctl enable iptables

4、重啟iptables service

systemctl restart iptables

5、執行保存配置命令

service iptables save
贊(0)
版權聲明:本文采用知識共享 署名4.0國際許可協議 [BY-NC-SA] 進行授權, 轉載請注明出處。
文章名稱:《Centos7執行”service iptables save”錯誤提示的解決方法》
文章鏈接:http://www.lrracing.com/13729.html
【聲明】:國外主機測評僅分享信息,不參與任何交易,也非中介,所有內容僅代表個人觀點,均不作直接、間接、法定、約定的保證,讀者購買風險自擔。一旦您訪問國外主機測評,即表示您已經知曉并接受了此聲明通告。
【關于安全】:任何 IDC商家都有倒閉和跑路的可能,備份永遠是最佳選擇,服務器也是機器,不勤備份是對自己極不負責的表現,請保持良好的備份習慣。