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

chenyajun  2021-08-24 19:41:51  阅读 4389 次 评论 0 条

出现:

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. 

service 命令只支持基础 LSB 动作(即 start、stop、restart、try-restart、reload、force-reload、status)。其他动作请使用 systemctl

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

iptables需要升级!解决方法:

systemctl stop firewalld
yum install iptables-services
systemctl enable iptables
systemctl start iptables

之后就可以执行命令了:

service iptables save




本文地址:http://www.chenyajun.net/index.php/post/71.html
版权声明:本文为原创文章,版权归 chenyajun 所有,欢迎分享本文,转载请保留出处!

评论已关闭!