解决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]LeetCode591. 标签验证器 | Tag Validator
Given a string representing a code snippet, you need to implement a tag validator to parse the code ...
- [Swift]LeetCode648. 单词替换 | Replace Words
In English, we have a concept called root, which can be followed by some other words to form another ...
- [Swift]LeetCode802. 找到最终的安全状态 | Find Eventual Safe States
In a directed graph, we start at some node and every turn, walk along a directed edge of the graph. ...
- IDEA 配置远程debug
1. 启动远程服务配置debug参数 远程服务启动时配置如下debug相关参数 java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address= ...
- Java部署项目命令学习小结
前言: 暂无 零:java -h 和很多linux命令一样,我们第一步先通过“java -h”命令查看java命令的使用语法,其输出如下 [root@wxapp203 basesoft]# java ...
- Centos7中文乱码问题的解决
刚安装centos7之后,语言默认不是中文,导致中文路径或中文文件在系统中显示为乱码,查了些资料解决了这个问题. 1 查看和安装中文库 [root@bogon ~]# echo $LANG zh_CN ...
- BBS论坛(一)
1.1.项目结构搭建 (1)创建flask项目Perfect_bbs,然后搭建项目结构如下: (2)构建蓝图 cms/views.py # cmd/views.py from flask import ...
- Java异常处理:给程序罩一层保险
文/沉默王二 人这一生,总会遇到一些不可预料的麻烦,这些麻烦可能会让我们遭受沉重的打击.为了减轻因此承受的负担,我们就会买保险. 本着负责任的态度,我们程序员在写代码的时候,都非常的严谨.但程序在运行 ...
- asp.net mvc学习(Vs技巧与Httpcontext)
模型绑定分析 博客模拟的表单已经可以包含网站开发过程中遇到的大部分的表单格式了,包含一些数组.对象等等. 1.直接拼接字符串 $.ajax({ url: "/XXX", type: ...
- ASP.NET在MVC控制器中获取Form表单值的方法
在网站开发中我们经常需要用到表单,那么,在前台页面的表单中提交到后台控制器后,后台控制器如何接收表单提交过来的数据呢?下面我们介绍几种常用的方法. 我们先看看前台页面,这里我们用一个用户名和密码的表单 ...