centos .7x service iptables save 错误解决方案
保存转发规则的时候,发现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 错误解决方案的更多相关文章
- centos 7 中没有iptables 和service iptables save 指令使用失败问题解决方案
1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...
- 3.centos 7执行service iptables save报错问题
1.报错 [root@localhost ~]# service iptables save The service command supports only basic LSB actions ( ...
- 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 ...
- 解决service iptables save出错please try to use systemctl
# service iptables save The service command supports only basic LSB actions (start, stop, restart, t ...
- 解决 service iptables save 报错 please try to use systemctl
本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...
- 31-1.解决service iptables save出错
CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替.service命令只保留下了极少部分使用 ...
- 新装云服务器没有iptables 文件,并且无法通过service iptables save操作
在安装zookeeper时,需要放开端口2181 按照视频教程在 /etc/sysconfig/ 下对iptables 文件进行编辑,但是该目录下没有此文件 通过强行写iptables -P OUT ...
- centos7 中没有service iptables save指令来保存防火墙规则
解决方法: systemctl stop firewalld 关闭防火墙yum install iptables-services 安装 iptables 服务systemctl enable ip ...
- centos7中没有service iptables save指令来保存防火墙规则
1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...
随机推荐
- c++11多线程---std::ref和std::cref
std::ref和std::cref 解释 std::ref 用于包装按引用传递的值. std::cref 用于包装按const引用传递的值. 为什么需要std::ref和std::cref ...
- 清北学堂2019.7.18 & 清北学堂2019.7.19
Day 6 钟皓曦 经典题目:石子合并 可以合并任意两堆,代价为数量的异或(^)和 f[s]把s的二进制所对应石子合并成一堆所花代价 枚举s的子集 #include<iostream> u ...
- 什么是HOOK功能?
HOOK API是一个永恒的话题,如果没有HOOK,许多技术将很难实现,也许根本不能实现.这里所说的API,是广义上的API,它包括DOS下的中断,WINDOWS里的API.中断服务.IFS和NDIS ...
- tomcat打开失败原因
我重装系统以后,tomcat无法打开,原因是有的项目的虚拟路径有误 到server.xml下修改虚拟路径
- app测试和web测试的区别
单纯从功能测试的层面上来讲的话,APP 测试.web 测试 在流程和功能测试上是没有区别的根据两者载体不一样,则区别如下:1.系统结构方面 web项目,b/s架构,基于浏览器的:web测试只要更新了服 ...
- GitHub入门(一)GIT配置与Hexo博客搭建
首先安装配置Git环境,由于本人使用Windows操作系统所以从msysgit.github.io下载msysGit Windows版本,安装.(Mac一般自带Git) 安装的时候一般使用默认选项,其 ...
- 【Java基础】内部类
非静态内部类不能拥有静态变量 为什么 下面这段代码,如果Lazyholder没有static修饰,则编译不过 class Singleton2 { private static class LazyH ...
- 【web前端】前段时间的面题整理(1)
这是我的试题答案整理,可能有多种答案.我也就写了一两种.在慢慢整合中 第一题 用js实现随机选取10-100之间的10个数字,存入一个数组,去重后求和(保证这10个数字不能出现重复) 要求:去重不能使 ...
- 普通项目——>maven项目——>SSM(一)
首先应该明白,SSM是什么? SSM指的是Spring+SpringMVC+MyBatis Spring Spring就像是整个项目中装配bean的大工厂,在配置文件中可以指定使用特定的参数去调用实体 ...
- Mac-peizhi
##1-JMeter4export JMETER_HOME=/Users/wulei/softwares/installedsoftwares/apache-jmeter-4.0export CLAS ...