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 ( ...
随机推荐
- PHP 登陆失效之后,重新登陆,跳转到失效前界面
登陆失效之后,需要重新进行登陆,登陆之后,进入到默认首页,如果需要继续之前的进行操作,必须重新点击菜单进行跳转,体验不太好 登陆的时候,将之前的url,拼接到登陆界面的url上作为一个redirect ...
- docker pull使用 代理
[root@fdfs- ~]# cat /usr/lib/systemd/system/docker.service [Unit] Description=Docker Application Con ...
- C#根据出生日期和当前日期计算精确年龄
C#根据出生日期和当前日期计算精确年龄更多 0c#.net基础 public static string GetAge(DateTime dtBirthday, DateTime dtNow){ st ...
- 05-CSS浮动、定位、页面布局
# 浮动 ### 文档流文档流,是指盒子按照html标签编写的顺序依次从上到下,从左到右排列,块元素占一行,行内元素在一行之内从左到右排列,先写的先排列,后写的排在后面,每个盒子都占据自己的位置. # ...
- SSH简单概念
Spring:轻量级控制反转(IoC)和面向切面(AOP)的容器框架,让对象与对象之间的关系通过配置文件来管理,减低耦合度 IoC:凡是在容器中配置过的对象才会有Spring提供的服务和功能 AOP: ...
- ssh: Could not resolve hostname github.com: Name or service not known
问题描述 今天早上在自己的虚拟机上用git pull命令更新github上的版本库时提示下面的错误 [root@localhost ~] git clone git@github.com:sdscbr ...
- Python之路-Python中的线程与进程
一.发展背景 任务调度 大部分操作系统(如Windows.Linux)的任务调度是采用时间片轮转的抢占式调度方式,也就是说一个任务执行一小段时间后强制暂停去执行下一个任务,每个任务轮流执行.任务执行的 ...
- 2018团队项目beta阶段成果汇总
2018团队项目beta阶段成果汇总 第一组:二手书 团队博客:http://www.cnblogs.com/DeltaFish/ 博客汇总:https://www.cnblogs.com/Del ...
- 在数据库中分析sql执行性能
SET STATISTICS PROFILE ON SET STATISTICS IO ON SET STATISTICS TIME ON GO /*--SQL脚本开始*/ SELECT * FROM ...
- CentOS 7 FTP的安装与配置
CentOS7 FTP安装与配置 1.FTP的安装 #安装yum install -y vsftpd #设置开机启动systemctl enable vsftpd.service #启动systemc ...