zoukankan      html  css  js  c++  java
  • centos .7x service iptables save 错误解决方案

    保存转发规则的时候,发现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

  • 相关阅读:
    cookie和session会话技术
    hdoj 1176 免费馅饼
    nyoj 14 会场安排问题
    hdoj 1575 Tr A
    poj 1163 The Triangle
    hdoj 2157 How many ways??
    贪心Poj1328
    贪心 序列
    差分约束Poj 3169 Layout
    差分约束Poj3159 Candies
  • 原文地址:https://www.cnblogs.com/Mercury-linux/p/11619650.html
Copyright © 2011-2022 走看看