centos7中没有service iptables save指令来保存防火墙规则
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指令来保存防火墙规则的更多相关文章
- centos7 中没有service iptables save指令来保存防火墙规则
解决方法: systemctl stop firewalld 关闭防火墙yum install iptables-services 安装 iptables 服务systemctl enable ip ...
- centos 7 中没有iptables 和service iptables save 指令使用失败问题解决方案
1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...
- 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 ...
- centos7 service iptables save 报错
解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl restart iptables 4.ser ...
- 解决 service iptables save 报错 please try to use systemctl
本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...
- 新装云服务器没有iptables 文件,并且无法通过service iptables save操作
在安装zookeeper时,需要放开端口2181 按照视频教程在 /etc/sysconfig/ 下对iptables 文件进行编辑,但是该目录下没有此文件 通过强行写iptables -P OUT ...
- 解决service iptables save出错please try to use systemctl
# service iptables save The service command supports only basic LSB actions (start, stop, restart, t ...
- centos .7x service iptables save 错误解决方案
保存转发规则的时候,发现service iptables save 无效,而且报错[root@localhost bin]# service iptables saveThe service comm ...
- 3.centos 7执行service iptables save报错问题
1.报错 [root@localhost ~]# service iptables save The service command supports only basic LSB actions ( ...
随机推荐
- 将查询列表内容保存到excel表格中,并保存到相应的盘中
1.先导入相应的jar包 2.一个小的Demo测试[实体类+测试类:保存excel的方法] Student实体类 public class Student{ private int id; priva ...
- nginx 499错误
原因: 服务响应时间太长,客户端自动断开链接. 解决: 1. 找到响应世间长的接口,看依赖的数据源(数据库,第三方接口等)响应时间是否超时,还是自己程序有逻辑问题. 可以通过加入日志打印时间消耗来确定 ...
- HDU 2783 You’ll be Working on the Railroad(最短路)
You’ll be Working on the Railroad Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/3276 ...
- python学习第四十二天列表生成式用法及作用
在操作列表或者元组的时候,对一系列的数据进行算法,比较整个数据加1,或翻倍,用传统的算法就很繁琐,列表给我们提供简便的方法 a=[i*i for i in rang(10)] a=[1,4,9,16, ...
- (一)WebPack4.0 从零开始
一:WebPack基础知识 (1):webpack的定义 webpack官网给出的定义是:webpack 是一个现代 JavaScript 应用程序的静态模块打包器(module bundler). ...
- [冲昏头脑]IDEA中的maven项目中学习log4j的日志操作
第一,你要有log4j的对应的包,由于我用的maven,所以直接在pom.xml文件依赖下载则可,如你尚为有此包,请自行百度下载导入,或上http://www.mvnrepository.com/搜索 ...
- AD转换为KiCAD的方法
一.Altium文件转KiCad文件 本文主要介绍: 1.AD文件(SCH和PCB)转换为KiCAD的方法 2.AD封装库转换为KiCAD库的方法 下面让我们进入正题 1.1 PCB的第一种转换方式 ...
- WTSQueryUserToken failed
https://www.cnblogs.com/tabjin/articles/11057663.html 令牌错误 https://www.cnblogs.com/FCoding/archive/2 ...
- bzoj5178 [Jsoi2011]棒棒糖 主席树+线段树二分
题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=5178 https://lydsy.com/JudgeOnline/problem.php?id ...
- 【leetcode】1038. Binary Search Tree to Greater Sum Tree
题目如下: Given the root of a binary search tree with distinct values, modify it so that every node has ...