# 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
systemctl mask firewalld

然后安装iptables-services

yum install iptables-services

设置开机启动防火墙

systemctl enable iptables

可以使用下面命令管理iptables

systemctl [stop|start|restart] iptables

这时可以保存防火墙规则了

service iptables save
or
/usr/libexec/iptables/iptables.init save

 如果你之后要使用firewall的话:

  执行命令,即可实现取消服务的锁定

  # systemctl unmask firewalld

  下次需要锁定该服务时执行

  # systemctl mask firewalld

解决service iptables save出错please try to use systemctl的更多相关文章

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

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

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

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

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

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

  4. 解决 service iptables start 无法启动的问题

    解决方式: iptables -F  // 初始化iptables. service iptables save  // 保存 service iptables restart  // 重启

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

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

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

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

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

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

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

  9. centos7 service iptables save 报错

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

随机推荐

  1. [Swift]LeetCode523. 连续的子数组和 | Continuous Subarray Sum

    Given a list of non-negative numbers and a target integer k, write a function to check if the array ...

  2. [Swift]LeetCode830. 较大分组的位置 | Positions of Large Groups

    In a string S of lowercase letters, these letters form consecutive groups of the same character. For ...

  3. spring boot - 整合jpa多对对关系保存和查询示例

    pojo: package com.example.zs.springDataJpa; import org.hibernate.annotations.Proxy; import javax.per ...

  4. 【Spark篇】--Spark中的宽窄依赖和Stage的划分

    一.前述 RDD之间有一系列的依赖关系,依赖关系又分为窄依赖和宽依赖. Spark中的Stage其实就是一组并行的任务,任务是一个个的task . 二.具体细节 窄依赖 父RDD和子RDD parti ...

  5. ASP.NET Core WebApi AspNetCoreRateLimit 限流中间件学习

    AspNetCoreRateLimit介绍: AspNetCoreRateLimit是ASP.NET核心速率限制框架,能够对WebApi,Mvc中控制限流,AspNetCoreRateLimit包包含 ...

  6. exec族函数详解及循环创建子进程

    前言:之前也知道exec族函数,但没有完全掌握,昨天又重新学习了一遍,基本完全掌握了,还有一些父子进程和循环创建子进程的问题,还要介绍一下环境变量,今天分享一下. 一.环境变量 先介绍下环境的概念和特 ...

  7. Chapter 4 Invitations——13

    "Thank you," I said icily. “谢谢你”,我冰冷的说道. His eyes narrowed. 他眯着眼睛. "You're welcome,&q ...

  8. Java类文件的结构

    Class文件是以8位字节为基础单位的二进制流,各部分中间没有分隔符.遇到8位字节以上的空间数据项时,则会按照高位在前的方式分割成若干个8位字节进行存储. Class文件采用类似C语言的伪结构体来存储 ...

  9. scrapy pipelines导出各种格式

    scrapy在使用pipelines的时候,我们经常导出csv,json.jsonlines等等格式.每次都需要写一个类去导出,很麻烦. 这里我整理一个pipeline文件,支持多种格式的. # -* ...

  10. centos7忘记root密码

    开机时狂点方向键下(Windows还原习惯了),或者狂点别的键.目的为了不让它进入系统. 方向键移动光标定位在第一行,按e编辑它. 在新界面找到linux16开头的行.→光标到  ro    改成rw ...