There are questions remain, We'll search for the answers together. But one thing we known for sure,the future is not set!

CentOS 7.6无法执行service iptables save命令的解决办法

系统防护 百蔬君 11770℃ 已收录 0评论

今日想看看iptables的内容,顺手输入一句命令
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. 

无法执行的原因是/etc/sysconfig/iptables 这个文件还没有生成呢。

iptables需要升级!

解决方法:

1,systemctl stop firewalld
2,yum install iptables-services
3,systemctl enable iptables
4,systemctl start iptables

之后就可以执行
service iptables save
命令了

转载请注明:百蔬君 » CentOS 7.6无法执行service iptables save命令的解决办法

喜欢 (32)or分享 (0)
发表我的评论
取消评论

请证明您不是机器人(^v^):

表情