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. Python---7函数(调用&定义函数)

    函数 Python内置了很多有用的函数,我们可以直接调用. 要调用一个函数,需要知道函数的名称和参数,比如求绝对值的函数abs(),只有一个参数.可以直接从Python的官方网站查看文档: http: ...

  2. 2020 将至,Tester 你过得还好么?

    "昏天黑地地执行用例.跟踪 bug.与开发和产品争吵.工作被压在产品发布的最后阶段,因而要背负整个团队的压力,在 retro meeting 时承受着疯狂 diss......" ...

  3. Swift iOS实现把PCM语音转成MP3格式

    最近折腾了swift的语音录制识别和转码,这块还是比较坑的,由于语音识别的准确度实测大概也就80%左右,所以还是需要上传录音文件啊.首先是用讯飞语音SDK实现语音录制和识别(语音听写),第一个坑是讯飞 ...

  4. AI:是猫还是狗,这是个问题

    如果你不喜欢小猫和小狗,你可能不知道他们具体是哪一种品种,但是一般来说,你都能区分出这是猫还是狗,猫和狗的特征还是不一样的,那我们如何用机器学习的方法训练一个网络区分猫狗呢? 我们选用的是 Kaggl ...

  5. MongoDB监控及报警

    转载请注明出处:https://www.cnblogs.com/shining5/p/11142357.html MongoDB监控及报警 Prometheus是由SoundCloud开发的开源监控报 ...

  6. Vue-API之全局配置

    API 全局配置 Vue.config 是一个对象,包含 Vue 的全局配置. 源码位置:util/config.js 搜索config 可以找到其源码地址,其中声明了config的类型和默认参数 下 ...

  7. Ubutun18.04安装Python3.7.6

    最近因为环境问题,简单记录下Python3.7的安装过程: 下载地址:http://python.org/ftp/python/3.7.6/Python-3.7.6.tgz 编译安装步骤: sudo ...

  8. 7-8 jmu-python-从列表中删除元素 (15 分)

    删除列表中所有符合条件的值. 输入格式: 输入n,代表要测试n次.每次测试:首先,输入1行字符串(字符串内的元素使用空格分隔)然后,输入要删除的元素x. 输出格式: 输出删除元素x后的每行字符串.如果 ...

  9. ArrayBuffer转base64详解

    先贴代码: const base64String = window.btoa(String.fromCharCode(... new Uint8Array(buffer))) 看起来非常的简洁,优美. ...

  10. Parcel上手——又一个打包工具

    Parcel是什么? 极速零配置Web应用打包工具 说到打包工具,大多人应该都用过Webpack,Parcel也是这一类工具. Parcel相比Webpack有什么优势? 配置简单 打包速度快 以下是 ...