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指令来保存防火墙规则的更多相关文章

  1. centos7 中没有service iptables save指令来保存防火墙规则

    解决方法: systemctl stop firewalld  关闭防火墙yum install iptables-services 安装 iptables 服务systemctl enable ip ...

  2. centos 7 中没有iptables 和service iptables save 指令使用失败问题解决方案

    1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...

  3. 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 ...

  4. centos7 service iptables save 报错

    解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl  restart iptables 4.ser ...

  5. 解决 service iptables save 报错 please try to use systemctl

    本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...

  6. 新装云服务器没有iptables 文件,并且无法通过service iptables save操作

    在安装zookeeper时,需要放开端口2181 按照视频教程在 /etc/sysconfig/ 下对iptables 文件进行编辑,但是该目录下没有此文件 通过强行写iptables -P  OUT ...

  7. 解决service iptables save出错please try to use systemctl

    # service iptables save The service command supports only basic LSB actions (start, stop, restart, t ...

  8. centos .7x service iptables save 错误解决方案

    保存转发规则的时候,发现service iptables save 无效,而且报错[root@localhost bin]# service iptables saveThe service comm ...

  9. 3.centos 7执行service iptables save报错问题

    1.报错 [root@localhost ~]# service iptables save The service command supports only basic LSB actions ( ...

随机推荐

  1. SpringBoot 使用logback

    1.添加pom引用 <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback ...

  2. 触摸板PCB制作-TM12

    1.布局: 使 PSoC 与Sensor之间的距离保持最小化是一个不错的做法. 通常将 PSoC 与其他组件一起贴装到底层,而将 CapSense Sensor置于顶层上.  Sensor和栅格地层位 ...

  3. HDFS镜像文件fsimage和编辑日志文件edits

    镜像文件和编辑日志文件 1)概念 namenode被格式化之后,将在/opt/module/hadoop-2.7.2/data/tmp/dfs/name/current目录中产生如下文件 edits_ ...

  4. Python 中的 os 模块常见方法?

    os.remove() 删除文件 os.rename() 重命名文件 os.walk() 生成目录树下的所有文件名 os.chdir() 改变目录 os.mkdir/makedirs 创建目录/多层目 ...

  5. Nhbernate

    一.ORM1.对象关系映射(Object Relational Mapping,简称ORM)是一种为了解决面向对象与关系数据库存在的互不匹配的现象的技术.2.ORM是通过使用描述对象和数据库之间映射的 ...

  6. Python之路-Python中文件和异常

    一.文件的操作 open函数 在python中,使用open函数,打开一个已经存在的文件,或者新建一个新文件. 函数语法 open(name[, mode[, buffering[,encoding] ...

  7. python常用函数 Y

    yield有点像return,但他会在下一次执行的时候从上次结束点继续执行,带有 yield 的函数在 Python 中被称之为 generator(生成器),生成器无法通过索引获取数据,同时也承诺使 ...

  8. LA 3263 That Nice Euler Circuit(欧拉定理)

    That Nice Euler Circuit Little Joey invented a scrabble machine that he called Euler, after the grea ...

  9. CreateProcessAsUser 服务调用

    CreateProcessAsUser 函数 如果想通过服务向桌面用户Session 创建一个复杂UI 程序界面,则需要使用CreateProcessAsUser 函数为用户创建一个新进程用来运行相应 ...

  10. CF1009F Dominant Indices 长链剖分

    题目传送门 https://codeforces.com/contest/1009/problem/F 题解 长链剖分的板子吧. 令 \(dp[x][i]\) 表示 \(x\) 的子树中的深度为 \( ...