首页 > 其他 > 详细

3.centos 7执行service iptables save报错问题

时间:2020-09-27 21:38:39      阅读:43      评论:0      收藏:0      [点我收藏+]

1.报错  

[root@localhost ~]# 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.

2.无法执行的原因是/etc/sysconfig/iptables 这个文件还没有生成呢。需要升级iptables。  

[root@localhost ~]# systemctl stop firewalld
systemctl stop 

[root@localhost ~]# yum install iptables-services.x86_64 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirrors.huaweicloud.com
 * updates: mirrors.huaweicloud.com
... ... 
Installed:
  iptables-services.x86_64 0:1.4.21-34.el7                                                              

Complete!

[root@localhost ~]# systemctl enable iptables Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
[root@localhost
~]# systemctl start iptables [root@localhost ~]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

 

3.centos 7执行service iptables save报错问题

原文:https://www.cnblogs.com/xinghen1216/p/13741157.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!