【rocky linux】firewalld切换到iptables 以及Failed to start IPv4 firewall with iptables.
关闭【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.的更多相关文章
- CentOS 7 :Failed to start IPv4 firewall with iptables.
用iptables开启防火墙报错: Failed to start IPv4 firewall with iptables. 转载于:https://blog.csdn.net/ls1645/art ...
- Centos7启动防火墙时报错Failed to start IPv4 firewall with iptables
今天在虚拟机的Linux系统(centos7)里安装Redis,准备学习一下布隆过滤器呢,安装完后使用Windows本机访问不了虚拟机里的Redis,telnet不通能够ping通.于是就去看防火墙, ...
- CentOS 7.2:Failed to start IPv4 firewall with iptables
问题 系统是centos7.2,且已经安装了iptables服务,但是在执行启动命令后,却报了iptables服务无法正常启动的错误. 启动命令如下: systemctl start iptables ...
- 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 ...
- CentOS7关闭/开启防火墙出现 Unit iptables.service failed to load
在vm中安装好tomcat,而且在liunx中使用nc命令可以返回成功,但是更换到window中访问不到tomcat的情况,是由于linux防火墙的问题造成的,传统的解决方式有2中 第一种解决方案: ...
- 解决 RHEL 7/ CentOS 7/Fedora 出现Unit iptables.service failed to load
一直用CentOS 6 习惯了,一下没适应过来.防火墙配置后执行service iptables save 出现”Failed to restart iptables.service: Unit ip ...
- Linux firewalld 防火墙
Linux firewalld 防火墙 简介 RHEL 7 系统中集成了多款防火墙管理工具,其中 firewalld(Dynamic Firewall Manager of Linux system ...
- 解决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 ...
- 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 ...
- 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则不会改变 ...
随机推荐
- CSS常用属性(2)
(4) position(定位) fixed 一般用来写网页顶端的固定导航条,或者两侧的菜单. <!--对于块级标签来说加上position:fixed之后,该div就不会占一整行,一般需要手动 ...
- 微信小程序自定义导航栏机型适配
自定义微信小程序头部导航栏,有几种方式 方式一 { "navigationStyle": "custom" // 将navigationStyle从默认defa ...
- python3 os.getcwd()和os.path.realpath()区别
在写一个android手机的自动化测试,用appium+python3,跟室友讨论拟定了一个框架,在写2个通用的简单模块时,遇到问题. 同一个目录下2个模块,driver.py(用于获取app 句柄) ...
- selenium结合tenacity的retry实现验证码失败重试
说在前面 验证码登录的demo后续可以单独讲解,VIP学员对这部分应该都是掌握的,此处不再赘述 本文假设了一个场景 你通过OCR识别的验证码是有一定的错误几率的 本文是通过识别后的验证码去加一个随机字 ...
- noip2020模拟赛 背包 (knapsack)
题目 区间 \(01\) 背包 \(1 \le l_i \le r_i \le n \le 20000,1 \le q \le 100000,1 \le m_i \le 500, 1 \le w_i ...
- LeetCode-23 合并K个升序链表
来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/merge-k-sorted-lists 题目描述 给你一个链表数组,每个链表都已经按升序排列. ...
- vue.use的原理
接收一个vue组件 该组件应该有个方法,install customComponent.install=function(Vue){ vue.Component('name',custemCompon ...
- javaweb同一个项目打包两次放在同一个tomcat下
web.xml中配置: <context-param> <param-name>webAppRootKey</param-name> <param-value ...
- 了解ASP(二)
变量 ASP中的变量有普通变量,Session变量,Application变量. 变量的生存期 在子程序外声明的变量可被 ASP 文件中的任何脚本访问和修改. 在子程序中声明的变量只有当子程序每次执行 ...
- hostPath类型的卷挂载
卷类型之hostPath hostPath类型的卷可以把宿主机节点上的文件或文件夹挂载到pod中 先来看看hostPath类型的卷如何配置: apiVersion: v1 kind: Pod meta ...