解决service iptables save出错please try to use systemctl
# 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的更多相关文章
- 31-1.解决service iptables save出错
CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替.service命令只保留下了极少部分使用 ...
- 解决 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 start 无法启动的问题
解决方式: iptables -F // 初始化iptables. service iptables save // 保存 service iptables restart // 重启
- 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 如果上述命令 ...
- 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 ...
随机推荐
- [Swift]LeetCode513. 找树左下角的值 | Find Bottom Left Tree Value
Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: 2 / \ 1 ...
- HTML入门教程,多年心血总结,一看就会
笔者在武汉蚂蹄软件服务中心做软件开发多年,最近花一天时间总结出一套HTML入门级的教程,全篇没有任何废话,全部是精华,希望对你入门web开发有一定的帮助. HTML基本格式 <html> ...
- HBase篇--初始Hbase
一.前述 1.HBase,是一个高可靠性.高性能.面向列.可伸缩.实时读写的分布式数据库.2.利用Hadoop HDFS作为其文件存储系统,利用Hadoop MapReduce来处理HBase中的海量 ...
- npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6
cnpm安装的时候出现的一个问题. 使用npm install cnpm -g --registry=https://registry.npm.taobao.org命令的时候就会出现下图中的WARN. ...
- 【Docker】(3)---linux部署Docker、Docker常用命令
linux部署Docker.Docker常用命令 本次部署Linux版本:CentOS 7.4 64位. 说明: 因为Docker是基于Linux 64bit的 所以Docker要求64位的系统且内核 ...
- Webpack+Vue如何导入Jquery和Jquery的第三方插件
创建一个jquery-vendor.js文件 import $ from 'jQuery'; console.log($); window.$ = $; window.jQuery = $; expo ...
- H5本地存储sessionStorage和localStorage的区别
sessionStorage用于本地存储一个会话(session)中的数据,这些数据只有在同一个会话中的页面才能访问并且当会话结束后数据也随之销毁.因此sessionStorage不是一种持久化的本地 ...
- Java基础1:深入理解Java面向对象三大特性
更多内容请关注微信公众号[Java技术江湖] 这是一位阿里 Java 工程师的技术小站,作者黄小斜,专注 Java 相关技术:SSM.SpringBoot.MySQL.分布式.中间件.集群.Linux ...
- 函数式编程之-bind函数
Bind函数 Bind函数在函数式编程中是如此重要,以至于函数式编程语言会为bind函数设计语法糖.另一个角度Bind函数非常难以理解,几乎很少有人能通过简单的描述说明白bind函数的由来及原理. 这 ...
- leetcode — merge-sorted-array
import java.util.Arrays; /** * Source : https://oj.leetcode.com/problems/merge-sorted-array/ * * * G ...