解决 service iptables save 报错 please try to use systemctl
本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案。报错
[root@Jaking ~]# 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.
解决方法停止 firewalld
[root@Jaking ~]# systemctl stop firewalld
[root@Jaking ~]# systemctl mask firewalld
Created symlink from /etc/systemd/system/firewalld.service to /dev/null.
安装 iptables-services
[root@Jaking ~]# yum install -y iptables-services
开启 iptables
[root@Jaking ~]# service iptables start
Redirecting to /bin/systemctl start iptables.service
还可以使用 systemctl 来控制 iptables
systemctl [start|status|stop|restart|enable] iptables
把 iptables 加到开机启动项中
[root@Jaking ~]# systemctl enable iptables
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
清空防火墙
[root@Jaking ~]# iptables -F
保存防火墙规则
[root@Jaking ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
# 或者
[root@Jaking ~]# /usr/libexec/iptables/iptables.init save
iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
解决 service iptables save 报错 please try to use systemctl的更多相关文章
- 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 ...
- centos7 service iptables save 报错
解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl restart iptables 4.ser ...
- 防火墙centos7执行 service iptables status报错问题完美解决
在centos7 执行防火墙命令时 service iptables status 报错如下: 解决方案 : 1.systemctl start firewalld.service(开启防火墙) 2. ...
- 解决service iptables save出错please try to use systemctl
# service iptables save The service command supports only basic LSB actions (start, stop, restart, t ...
- 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 ...
- centos .7x service iptables save 错误解决方案
保存转发规则的时候,发现service iptables save 无效,而且报错[root@localhost bin]# service iptables saveThe service comm ...
- 解决 service iptables start 无法启动的问题
解决方式: iptables -F // 初始化iptables. service iptables save // 保存 service iptables restart // 重启
随机推荐
- sshd安全加固
常见的防护措施: ——用户限制,黑白名单 ——更改验证方式(密码——>密钥对) ——防火墙..... 修改 sshd 配置文件 /etc/ssh/sshd_config -port 3389 # ...
- RNN、LSTM介绍以及梯度消失问题讲解
写在最前面,感谢这两篇文章,基本上的框架是从这两篇文章中得到的: https://zhuanlan.zhihu.com/p/28687529 https://zhuanlan.zhihu.com/p/ ...
- suse12安装详解
1.部署步骤 1.1.启动安装程序 在启动页面上选择Installation,然后按Enter键,这将载入SUSE Linux服务器安装程序并以普通模式安装. 1.2.选择安装语言 Language和 ...
- 微信小程序~基础组件
(1)视图容器 名称 功能说明 movable-view 可移动的视图容器,在页面中可以拖拽滑动 cover-image 覆盖在原生组件之上的图片视图 cover-view 覆盖在原生组件之上的文本视 ...
- spring boot学习笔记(一)
(翻译看个人意愿) 官方介绍: Spring Boot makes it easy to create stand-alone, production-grade Spring based Appli ...
- px em 和rem之间的区别
背景: px:像素是相对于显示器屏幕分辨率而言的相对长度单位.pc端使用px倒也无所谓,可是在移动端,因为手机分辨率种类颇多,不可能一个个去适配,这时px就显得非常无力,所以就要考虑em和rem. e ...
- Redis 缓存失效机制
Redis缓存失效的故事要从EXPIRE这个命令说起,EXPIRE允许用户为某个key指定超时时间,当超过这个时间之后key对应的值会被清除,这篇文章主要在分析Redis源码的基础上站在Redis设计 ...
- 导入Excel数据到Oracle数据库的脚本
在cmd运行窗口中输入:sqlldr customermanager/123@orcl control="E:\CustomerData\excelInputOracle\insert.ct ...
- codevs 1683 车厢重组
1683 车厢重组 时间限制: 1 s 空间限制: 1000 KB 题目等级 : 白银 Silver 题目描述 Description 在一个旧式的火车站旁边有一座桥,其桥面可以绕河中心的桥 ...
- 洛谷 P2661 信息传递 题解
P2661 信息传递 题目描述 有 \(n\) 个同学(编号为 \(1\) 到 \(n\) )正在玩一个信息传递的游戏.在游戏里每人都有一个固定的信息传递对象,其中,编号为 \(i\) 的同学的信息传 ...