保存转发规则的时候,发现service iptables save 无效,而且报错
[root@localhost bin]# 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.,产生这个问题的原因是iptables的服务没有安装

关闭防火墙

#停止firewall
systemctl stop firewalld.service

#禁止firewall开机启动
systemctl disable firewalld.service

#查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
firewall-cmd --state

安装iptables服务
安装完成iptables后,在使用service iptables save方法就没有问题了

#安装或更新服务
yum install iptables-services

#启用iptables
systemctl enable iptables

#启动iptables
systemctl start iptables 打开iptables

[root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

————————————————
版权声明:本文为CSDN博主「狂飙的yellowcong」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yelllowcong/article/details/78229862

centos .7x service iptables save 错误解决方案的更多相关文章

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

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

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

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

  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. 解决service iptables save出错please try to use systemctl

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

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

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

  6. 31-1.解决service iptables save出错

    CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替.service命令只保留下了极少部分使用 ...

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

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

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

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

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

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

随机推荐

  1. 开发-日常工具:TFS(Team Foundation Server)

    ylbtech-开发-日常工具:TFS(Team Foundation Server) TFS(Team Foundation Server)是一个高可扩展.高可用.高性能.面向互联网服务的分布式文件 ...

  2. 关于db4o的透明激活与激活声明

    关于db4o的透明激活与激活声明 有关于透明激活,其介绍可以参看这里:http://www.cnblogs.com/redmoon/archive/2008/02/23/1078619.html 文中 ...

  3. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jeewx.weixin_account_user_relation' doesn't exist

    [INFO] Scanning for projects...[INFO] [INFO] ------------------------------------------------------- ...

  4. 一文学会Go - 2 数据结构与算法实践篇

    练习:使用go语言实现冒泡排序和归并排序 冒泡排序是所有排序算法中最简单的,练习时先实现它: func bubbleSort(array []int) { n := len(array) ; j &l ...

  5. 通俗易懂的理解 Redux(知乎)

    1. React有props和state: props意味着父级分发下来的属性[父组件的state传递给子组件  子组件使用props获取],state意味着组件内部可以自行管理的状态,并且整个Rea ...

  6. Matlab——程序设计

    M文件 我们之前所做的运算————> 算式不太长,或想以交谈式方式进行运算 如果算式很长或是需要一再执行的算式————> 采用M文件的方式 [将指令及算式写成巨集程式然后储存成一个特别的文 ...

  7. 1.parrot os 3.5-----nmap-----katoolin--zenmap

    源:https://www.youtube.com/watch?v=LpM1KooILRc&list=PLBf0hzazHTGOEuhPQSnq-Ej8jRyXxfYvl&index= ...

  8. 方便测试和调用webservice的工具(转)

    现在很多时候我们都会遇到这种情况:自己开发的程序要和其他各种各样的程序进行接口数据交互,这里就用到常用的接口服务的调用,但是有时候为了进行方便的测试,我们可能会写许多测试类等来测试,这样浪费了时间,也 ...

  9. 第四周课程总结与第二次实验报告(Java简单类与对象)

    1.写一个名为Rectangle的类表示矩形.其属性包括宽width.高height和颜色color,width和height都是double型的,而color则是String类型的.要求该类具有: ...

  10. Hive-java.lang.ClassNotFoundException: org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe

    Task with the most failures(): ----- Task ID: task_1555476136794_8201_m_000000 URL: http://hadoop1:8 ...