保存转发规则的时候,发现service iptables save 无效,而且报错
[root@localhost bin]# 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.,产生这个问题的原因是iptables的服务没有安装

关闭防火墙

#停止firewall
systemctl stop firewalld.service

#禁止firewall开机启动
systemctl disable firewalld.service

#查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
firewall-cmd --state

安装iptables服务
安装完成iptables后,在使用service iptables save方法就没有问题了

#安装或更新服务
yum install iptables-services

#启用iptables
systemctl enable iptables

#启动iptables
systemctl start iptables 打开iptables

[root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

————————————————
版权声明:本文为CSDN博主「狂飙的yellowcong」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yelllowcong/article/details/78229862

centos .7x service iptables save 错误解决方案的更多相关文章

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

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

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

    1.报错 [root@localhost ~]# service iptables save The service command supports only basic LSB actions ( ...

  3. 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 ...

  4. 解决service iptables save出错please try to use systemctl

    # service iptables save The service command supports only basic LSB actions (start, stop, restart, t ...

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

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

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

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

  7. 新装云服务器没有iptables 文件,并且无法通过service iptables save操作

    在安装zookeeper时,需要放开端口2181 按照视频教程在 /etc/sysconfig/ 下对iptables 文件进行编辑,但是该目录下没有此文件 通过强行写iptables -P  OUT ...

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

    解决方法: systemctl stop firewalld  关闭防火墙yum install iptables-services 安装 iptables 服务systemctl enable ip ...

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

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

随机推荐

  1. 网络协议之TCP/IP协议

    沙漏计时器型TCP/IP协议族,允许IP on everyting,即支持多种形式和物理层和数据链路层实现:同时支持多种多样的应用层协议,扩展了各式各样的服务. IP协议(网际协议) 与IP协议配套使 ...

  2. GitHub - 解决 GitHub Page 404

    带有下划线的文件报 404 解决:在仓库文件夹根目录添加.nojekyll文件 参见: Bypassing Jekyll on GitHub Pages - The GitHub Blog How t ...

  3. 003-unity3d 物理引擎-示例2 打箱子

    一.基础知识点 1.坐标.向量等 )) { //1.将鼠标坐标 转化为 世界坐标 由于鼠标z轴 可能不存在,故自定义为3 Vector3 targetPos = Camera.main.ScreenT ...

  4. 操作系统 - Linux操作系统 - Centos - Centos6.5 - 安装|命令|使用汇总

    快捷键 打开终端 右键 —>open terminal 网络配置 配置文件修改 - ONBOOT=no 修改为 ONBOOT=yes 工具 - gcc 安装 yum -y install gcc ...

  5. TS学习笔记----(一)基础类型

    布尔值: boolean let isDone: boolean = false; 数字: number 和JavaScript一样,TS里的所有数字都是浮点数. 支持十进制和十六进制字面量,TS还支 ...

  6. docker私有仓库-harbor

    简单说一下Harbor的部署,踩了几个坑,参考同事大神的配置文件,一脸懵逼的部署出来了,其中部分内容参考了网上一些大神的文档,本篇文章仅供参考学习,如有雷同,万分荣幸. 这篇文档仅限于centos7参 ...

  7. [Web 前端] 028 jQuery 事件

    目录 jQuery 的事件 1. 事件绑定 1.1 事件的获取 1.2 基本绑定 1.3 动态绑定 2. 事件触发 2.1 触发的写法 2.2 常用的鼠标事件 3. 事件冒泡和默认行为 3.1 事件冒 ...

  8. windows下重启nginx

    参考:从零学nginx-windows下reload配置无效及如何重启 因为Nginx是多进程模型,有一个主进程和多个子进程,主进程只负责管理子进程,基本的网络事件由各个子进程处理. 所以有时候当我们 ...

  9. C++中操作符重载的概念

    1,下面的复数解决方案是否可行? 1,代码示例: class Comples { public: int a; int b; }; int main() { Complex c1 = {, }; Co ...

  10. 对C++拷贝构造函数的一点理解

    一. 什么是拷贝构造函数 先看一个简单的例子: #include <iostream> using namespace std; class CExample { private: int ...