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. JavaScript CMD规范

    CMD是另一种js模块化方案,它与AMD很类似,不同点在于:AMD 推崇依赖前置.提前执行,CMD推崇依赖就近.延迟执行.此规范其实是在sea.js推广过程中产生的. AMD规范请移步AMD 模块化规 ...

  2. Git之pull,fetch差别

    简言之, pull=fetch+merge,下拉远程分支并与本地分支合并. fetch只是下拉远程分支,怎么合并,可以自己再做选择. 进一步了解是,git本地有暂存区(亦称为Index区) fetch ...

  3. Linux设置系统时区

    https://www.xlsys.cn/1741.html 如果你的 Linux 系统时区配置不正确,必需要手动调整到正确的当地时区.NTP 对时间的同步处理只计算当地时间与 UTC 时间的偏移量, ...

  4. epoll的陷阱

    Starvation 特别提出在ET模式下,因为需要一次性把数据读完,如果一次性通知的数据过大,有可能处理时间过长,导致同一线程其他的事件长时间等待.这个不仅仅是ET模式下,也不仅仅是epoll模型下 ...

  5. 请求接口获取的json 字符串 前后不能有 双引号

    请求接口获取的json 字符串 前后不能有 双引号 否则JSON.parse 转换会报错

  6. Centos7安装RabbitMQ详细教程

    MQ引言 什么是MQ MQ:message Queue翻译为消息队列,通过典型的生产者和消费者模型不断向消息队列中生产消息,消费者不断从队列中获取消息.因为消息的生产和消费都是一部的,而且只关心消息的 ...

  7. python函数1-函数基础

  8. 技术基础 | Cassandra RBAC助你打击“虚拟海盗”,让他们对数据“战利品”望而不得

    现如今,我们称虚拟世界里的海盗们为"黑客",他们所追寻的战利品就是在你数据库某处的数据.   而我们能够保证你的数据安全的工具之一,就是"Cassandra基于角色的访问 ...

  9. 用percona monitoring plugins 监控mysql

    下载:http://www.percona.com/redir/downloads/percona-monitoring-plugins/1.1.1/percona-zabbix-templates- ...

  10. mysql的逻辑备份和恢复

    备份指定的数据库或此数据库中的某些表 mysqldump [options] db_name [tables] >backup.sql 备份指定的一个或多个数据库 mysqldump --dat ...