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报错问题的更多相关文章

  1. CentOS7 执行 service iptables save 报错 The service command supports only basic LSB actions xxxxxx

    现象描述 在 CentOS 7.6.1810 下执行 service iptables save 命令,出现如下错误: [root@test ~]# service iptables save The ...

  2. 解决 service iptables save 报错 please try to use systemctl

    本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...

  3. 防火墙centos7执行 service iptables status报错问题完美解决

    在centos7 执行防火墙命令时 service iptables status 报错如下: 解决方案 : 1.systemctl start firewalld.service(开启防火墙) 2. ...

  4. centos7 service iptables save 报错

    解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl  restart iptables 4.ser ...

  5. 最新cenos执行service httpd restart 报错Failed to restart httpd.service: Unit not found.

    原来是需要将Apache注册到Linux服务里面啊!注册Apache到Linux服务在Linux下用源代码方式编译安装完Apache后,启动关闭Apache可以通过如下命令实现: /usr/local ...

  6. centos 7 中没有iptables 和service iptables save 指令使用失败问题解决方案

    1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...

  7. centos7中没有service iptables save指令来保存防火墙规则

    1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...

  8. centos .7x service iptables save 错误解决方案

    保存转发规则的时候,发现service iptables save 无效,而且报错[root@localhost bin]# service iptables saveThe service comm ...

  9. 31-1.解决service iptables save出错

    CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替.service命令只保留下了极少部分使用 ...

随机推荐

  1. sql操作数据库(3)-->外键约束、数据库表之间的关系、三大范式、多表查询、事务

    外键约束 在新表中添加外键约束语法: constraint 外键约束名称 foreign key(外键的字段名称) references 主表表名(主键字段名) 在已有表中添加外键约束:alter t ...

  2. Second_week_mofangzhen

    第二周 奇数阶魔方阵 一.上节回顾 1.数组的基本操作 数组:若干个相同类型变量的集合. 声明:数据类型 数组名称[]; (在栈内存分配空间,存储的是数组的引用地址.数组首元素在堆内存 中的地址) 初 ...

  3. MySQL45讲笔记-事务隔离级别,为什么你改了数据我看不见

    简单来说,事务就是要保证一组数据库操作,要么全部成功,要么全部失败.在MySQL中,事务至此是在引擎层实现的,但并不是所有的MySQL引擎都支持事务,这也是MyISAM被InnoDB取代的原因之一. ...

  4. ansible 安装和使用

                                ansible 安装和使用   ## 安装epel 源: rpm -ivh https://dl.fedoraproject.org/pub/e ...

  5. 【Linux】sudo配置文件讲解

    一.sudo执行命令的流程 将当前用户切换到超级用户下,或切换到指定的用户下, 然后以超级用户或其指定切换到的用户身份执行命令,执行完成后,直接退回到当前用户. 具体工作过程如下: 当用户执行sudo ...

  6. Java中的深浅拷贝问题,你清楚吗?

    一.前言 拷贝这个词想必大家都很熟悉,在工作中经常需要拷贝一份文件作为副本.拷贝的好处也很明显,相较于新建来说,可以节省很大的工作量.在Java中,同样存在拷贝这个概念,拷贝的意义也是可以节省创建对象 ...

  7. django中的几种返回模版的方式

    redirect方法-----(重定向) # 首先导入redirect方法, from django.shortcuts import redirect 在函数中写一个返回值 return redir ...

  8. uni-app开发经验分享四: 实现文字复制到选择器中

    这里分享一个我经常用到的一个方法,主要是用来复制文字内容,具体代码如下: var that=this; if(!document){ uni.setClipboardData({ data:复制的值, ...

  9. Kubernetes 存储简介

    存储分类结构图 半持久化存储 1.EmptyDir EmptyDir是一个空目录,生命周期和所属的 Pod 是完全一致的,EmptyDir的用处是,可以在同一 Pod 内的不同容器之间共享工作过程中产 ...

  10. 安装OpenDaylight及Openflow插件

    1. 安装 Java 和 Maven CentOS7: yum install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64 ma ...