1.任意运行一条iptables防火墙规则配置命令:

iptables -P OUTPUT ACCEPT

2.对iptables服务进行保存:

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.

解决方法:
systemctl stop firewalld 关闭防火墙
yum install iptables-services 安装或更新服务
再使用systemctl enable iptables 启动iptables
最后 systemctl start iptables 打开iptables

再执行service iptables save

3.重启iptables服务:

service iptables restart

执行完毕之后/etc/syscofig/iptables文件就有了

代码:

systemctl stop firewalld
yum -y install iptables-services
systemctl enable iptables
systemctl start iptables
service iptables save
service iptables restart

centos7中没有service iptables save指令来保存防火墙规则的更多相关文章

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

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

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

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

  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. centos7 service iptables save 报错

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

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

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

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

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

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

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

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

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

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

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

随机推荐

  1. oracle-第N篇加强专题

    1.Oracle数据库日期类型 1>日期的比较 2>日期格式化 2.Oracle字符串类型 1>常用函数

  2. POJ-3468 A Simple Problem with Integers (区间求和,成段加减)

    You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of op ...

  3. C# 判断文件夹与文件是否存在

    //在上传文件时经常要判断文件夹是否存在,如果存在就上传文件,否则新建文件夹再上传文件 判断语句为 if (System.IO.Directory.Exists(Server.MapPath(&quo ...

  4. jquery chosen插件使用及select常用方法

    1.chosen插件使用 chosen插件依赖于jQuery库或prototype,使用之前要先引入jQuery或prototype. 引入jquery插件和chosen插件,对需要美化的下拉框执行c ...

  5. 【记录】java解析xml文件

    最近新需求要解析xml格式的日志文件,解析完之后数据库落地. 经过度娘搜索,写了demo,现记录如下: 测试XML <?xml version="1.0" encoding= ...

  6. Linux系统启动过程浅析

    经过老师的讲解以及查阅资料后,现对Linux系统启动做以浅析,仅是个人理解. 主要的步骤有以下几步: 第一步:Power On.用户按下电源开关的那一瞬间,叫Power On阶段 .在这个阶段,BIO ...

  7. C# List<object> 按特定字段排序

    using System; using System.Collections; using System.Collections.Generic; using System.Linq; using S ...

  8. 18-基于双TMS320C6678 DSP的3U VPX的信号处理平台

    基于双TMS320C6678 DSP的3U VPX的信号处理平台 一.板卡概述 板卡由我公司自主研发,基于3U VPX架构,处理板包含两片TI DSP TMS320C6678芯片:一片Xilinx公司 ...

  9. 一、Core的布局页、起始页及错误页

    一.布局页面: 使用布局页相当于一个母版页,可以将各个页面公用部分,如上方标题区.左侧导航菜单区.下方版权声明及状态显示区以及通用的js及css引用等,集中放到布局页管理,具体功能页面只需关注自己独有 ...

  10. 06Web服务

    1.web开发入门 1.1 引入 软件结构分类: CS结构:客户端和服务器端 特点: 1)必须安装特点的客户端程序 2)服务器端升级,客户端同步升级 BS结构:浏览器和服务器端 特点: 1)不需要安装 ...