关闭【firewalld】,安装iptables并启动

#关闭自带 firewall
systemctl stop firewalld
systemctl mask firewalld

#显示当前 firewall状态(mask即成功)
systemctl status firewalld

#安装 iptables
yum install iptables-services

#添加入开机自启
systemctl enable iptables

#开放端口(根据自己需求删减)
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT

#保存防火墙配置
service iptables save

#启动 iptables
systemctl start iptables

#显示当前 iptables 状态
systemctl status iptables.servic

还原方法:

#关闭 iptables
systemctl mask iptables
systemctl stop iptables

#切换到 firewalld
systemctl unmask friewalld
systemctl start friewalld

dlc1: Failed to start IPv4 firewall with iptables.

可能是没保存配置,执行以下指令

service iptables save
systemctl start iptables
systemctl status iptables.servic

【rocky linux】firewalld切换到iptables 以及Failed to start IPv4 firewall with iptables.的更多相关文章

  1. CentOS 7 :Failed to start IPv4 firewall with iptables.

    用iptables开启防火墙报错: Failed to start  IPv4 firewall with iptables. 转载于:https://blog.csdn.net/ls1645/art ...

  2. Centos7启动防火墙时报错Failed to start IPv4 firewall with iptables

    今天在虚拟机的Linux系统(centos7)里安装Redis,准备学习一下布隆过滤器呢,安装完后使用Windows本机访问不了虚拟机里的Redis,telnet不通能够ping通.于是就去看防火墙, ...

  3. CentOS 7.2:Failed to start IPv4 firewall with iptables

    问题 系统是centos7.2,且已经安装了iptables服务,但是在执行启动命令后,却报了iptables服务无法正常启动的错误. 启动命令如下: systemctl start iptables ...

  4. centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod

    centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod ...

  5. CentOS7关闭/开启防火墙出现 Unit iptables.service failed to load

    在vm中安装好tomcat,而且在liunx中使用nc命令可以返回成功,但是更换到window中访问不到tomcat的情况,是由于linux防火墙的问题造成的,传统的解决方式有2中 第一种解决方案: ...

  6. 解决 RHEL 7/ CentOS 7/Fedora 出现Unit iptables.service failed to load

    一直用CentOS 6 习惯了,一下没适应过来.防火墙配置后执行service iptables save 出现”Failed to restart iptables.service: Unit ip ...

  7. Linux firewalld 防火墙

    Linux firewalld 防火墙  简介 RHEL 7 系统中集成了多款防火墙管理工具,其中 firewalld(Dynamic Firewall Manager of Linux system ...

  8. 解决CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory.

    CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...

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

  10. Ubuntu 16.04下操作iptables的技巧(解决Failed to start iptables.service: Unit iptables.service not found.或者/etc/init.d/iptables: 没有那个文件或目录)

    /etc/init.d/iptables网上的解法应该都是基于CentOS 6去实践,而在CentOS 7中又被firewalld给取代,所以操作上的写法基本会改变,但是底层iptables则不会改变 ...

随机推荐

  1. mingw + cmake + vscode

    .vscode settings.json {     "cmake.generator": "MinGW Makefiles" } cmake-kits.js ...

  2. 大曝光!从RabbitMQ平滑迁移至Kafka架构设计方案!

    历史原因,公司存在多个 MQ 同时使用的问题,我们中间件团队在去年下半年开始支持对 Kafka 和 Rabbit 能力的进行封装,初步能够完全支撑业务团队使用. 鉴于在之前已经基本完全实施 Kafka ...

  3. Vulhub 漏洞学习之:Redis

    Vulhub 漏洞学习之:Redis 1 Redis简介 Redis 是完全开源的,遵守 BSD 协议,是一个高性能的 key-value 数据库.Redis 与其他 key - value 缓存产品 ...

  4. python (),[], {}的含义

    1.python ()表示元组,元组是一种不可变序列 1)创建如:tuple = (1,2,3) 取数据 tuple[0]...... tuple[0,2].....tuple[1,2]...... ...

  5. 跨平台C++ DLL导出宏

    #pragma once #if defined(__GNUC__) #define _DEPRECATED_ __attribute__((deprecated)) #define _FORCE_I ...

  6. CF623A Graph and String

    个人思路: 显然,和其他所有点连边的点都是 b.我们接下来不考虑这些点. 剩余 a 和 c 必然自己形成一个连通块,每个点与块内其他所有点连边. 超过 \(2\) 个连通块,或存在点没有与块内其他所有 ...

  7. TDSQL-C Serverless 服务是如何实现通过接入层来实现恢复感知

    在一些极限的测试场景下,数据库实例会频繁的自动启停,这时候如何保证数据库实例停止后快速恢复呢?如何保证在恢复数据库实例时无需用户重复链接,直到恢复访问? 站在用户的角度考虑,谁都不希望数据库每次启停都 ...

  8. Word11 工程学院讲师论文office真题

    1.根据题目一的要求,打开素材文件,点击[文件]-[另存为],选择[当前文件夹],命名为Word. 2.根据题目二的要求,根据提供的参考样式,打开Word的文档,在[布局]里点击[页面设置]的右下角, ...

  9. csp201503-2(数字排序)

    问题描述 给定n个整数,请统计出每个整数出现的次数,按出现次数从多到少的顺序输出. 输入格式 输入的第一行包含一个整数n,表示给定数字的个数. 第二行包含n个整数,相邻的整数之间用一个空格分隔,表示所 ...

  10. C6657子卡模块设计资料:268-基于FMC接口的DSP TMS320C6657子卡模块

    基于FMC接口的DSP TMS320C6657子卡模块 一. 概述        FMC连接器是一种高速多pin的互连器件,广泛应用于板卡对接的设备中,特别是在xilinx公司的所有开发板中都使用.该 ...