站长视角
用户至上

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”错误提示的解决方法》
文章链接:https://www.veidc.com/13729.html
【声明】:国外主机测评仅分享信息,不参与任何交易,也非中介,所有内容仅代表个人观点,均不作直接、间接、法定、约定的保证,读者购买风险自担。一旦您访问国外主机测评,即表示您已经知晓并接受了此声明通告。
【关于安全】:任何 IDC商家都有倒闭和跑路的可能,备份永远是最佳选择,服务器也是机器,不勤备份是对自己极不负责的表现,请保持良好的备份习惯。

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

登录

找回密码

注册