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文件就有了

centos 7 中没有iptables 和service iptables save 指令使用失败问题解决方案的更多相关文章

  1. RHEL/CentOS 7中Nginx的systemd service

    源码安装的nginx ,没有systemd service 管理 nginx 下面教程,告诉你如何设置nginx 的systemd service nginx systemd的服务文件是/usr/li ...

  2. 电脑中已有VS2005和VS2010安装.NET3.5失败的解决方案

    1.重启 MSI 安装服务: 运行-输入“CMD”命令,在弹出的对话框中输入命令: msiexec/unregserver ,回车,并再次输入 msiexec/regserver . 2.启用 Pri ...

  3. 在windows7中使用计划任务命令SCHTASKS查询计划任务失败的解决方案

    造成这种原因是因为编码问题: 因此需要修改编码:chcp schtasks.exe /query 会报错     错误: 无法加载列资源. 修改编码为936为436就可以允许啦,但是中文不不能显示啦. ...

  4. CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

    错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed t ...

  5. CentOS系统中使用iptables设置端口转发

    echo 1 > /proc/sys/net/ipv4/ip_forward 首先应该做的是/etc/sysctl.conf配置文件的 net.ipv4.ip_forward = 1 默认是0  ...

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

  7. service iptables xxx无效命令的情况下,如何启动/重启iptables

    最近在CentOS 7.6下使用service iptables xxx相关命令,提示如下错误:The service command supports only basic LSB actions ...

  8. 解决 service iptables start 无法启动的问题

    解决方式: iptables -F  // 初始化iptables. service iptables save  // 保存 service iptables restart  // 重启

  9. 通达OA在centos系统中快速部署文档(web和数据库)

    通达OA2008从windows环境移植到linux中(centos5.5及以上版本) 如果安装好了,还是无法访问,则需要清空浏览器缓存即可 1.安装lamp环境,这里用的是xampp集成安装包xam ...

随机推荐

  1. django反向解析和正向解析

    Django的正向解析和反向解析 先创建一个视图界面 urls.py index.html index页面加载的效果 正向解析 test/?result=1 所谓正向解析就是直接在这里写地址 向url ...

  2. 在腾讯云服务器上安装JDK+Tomcat并启动tomcat

    由于Java web项目需要使用到tomcat所以决定在腾讯云服务器(centos7.X)上安装JDK和tomcat,来部署我们的项目. 准备工具: 云服务器:centos7.x+ 本地连接服务器:X ...

  3. 《JavaScript算法》二分查找的思路与代码实现

    二分查找的思路 首先,从有序数组的中间的元素开始搜索,如果该元素正好是目标元素(即要查找的元素),则搜索过程结束,否则进行下一步. 如果目标元素大于或者小于中间元素,则在数组大于或小于中间元素的那一半 ...

  4. zookeeper 单机部署

    第一步:下载安装包 这里以3.4.11为例  https://archive.apache.org/dist/zookeeper/ 点进去看: 下载tar文件 第二步:上传到服务器 使用ftp工具上传 ...

  5. RE模块(正则)

    RE模块和正则表达式 正则表达式 正则就是用来筛选字符串中的特定的内容的(只要是reg...一般情况下都是跟正则有关) re模块与正则表达式之间的关系: 正则表达式不是python独有的 它是一门独立 ...

  6. canvas基本

    基本 支持ie 9+,firefox,opera,chrome,safari html: <canvas id="fir_canvas" width="400&qu ...

  7. Promethues配置

    # my global config global: scrape_interval: 10s # Set the scrape interval to every 15 seconds. Defau ...

  8. PHP 解决对文件操作的高并发问题

    解决方案:     对文件进行加锁时,设置一个超时时间.超时设置为1ms,如果这段时间内没有获得锁,就反复获得,直到获得对文件的操作权为止.如果超市限制已到,就必须马上退出,让出锁让其他进程进行操作. ...

  9. 一步到位datatabls中文化

    #一步到位datatabls中文化 加入以下代码 $(document).ready(function () { $('#declarationList').DataTable({ destroy:t ...

  10. 什么是x86什么是x64 它们有什么区别

    1.内存寻址不同: 32位系统,最大支持3.5G内存,如果在32位系统中使用4G或更大的内存,电脑最多只可以识别3.4G左右可用,而64位系统最大可以支持128G大内存. 2.运算速度不同: 64位系 ...