CentOS 7 :Failed to start IPv4 firewall with iptables._技术小结的博客-CSDN博客


本站和网页 https://blog.csdn.net/ls1645/article/details/78750561 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

CentOS 7 :Failed to start IPv4 firewall with iptables._技术小结的博客-CSDN博客
CentOS 7 :Failed to start IPv4 firewall with iptables.
技术小结
于 2017-12-08 14:13:57 发布
28955
收藏
36
分类专栏:
【linux】
文章标签:
linux
运维
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/ls1645/article/details/78750561
版权
【linux】
专栏收录该内容
5 篇文章
0 订阅
订阅专栏
    用iptables开启防火墙报错: Failed to start  IPv4 firewall with iptables.
    错误原因:因为centos7.0默认不是使用iptables方式管理,而是firewalld方式。CentOS6.0防火墙用iptables管理。
        解决办法有两个:使用firewalld方式。或者关闭firewalld,然后安装iptables。
一、关闭firewalld,安装iptables过程:
停止并屏蔽firewalld:
systemctl stop firewalld
systemctl mask firewalld
安装iptables-services:
yum install iptables-services
设置开机启动:
systemctl enable iptables
停止/启动/重启 防火墙:
systemctl [stop|start|restart] iptables
#or
service iptables [stop|start|restart]
保存防火墙配置:
service iptables save
#or
/usr/libexec/iptables/iptables.init save
     按照上述命令配置后的界面:
二、从iptables切换回firewalld
    1、先看firewalld的状态:inactive
     
    2、安装firewalld
   3、切换到firewalld,切换过程与切换iptables一样
/************下面是iptables的一些命令*******************************/
查询防火墙状态:
[root@localhost ~]# service  iptables status
停止防火墙:
[root@localhost ~]# service  iptables stop 
启动防火墙:
[root@localhost ~]# service  iptables start 
重启防火墙:
[root@localhost ~]# service  iptables restart 
永久关闭防火墙:
[root@localhost ~]# chkconfig  iptables off 
永久关闭后启用:
[root@localhost ~]# chkconfig  iptables on
开启端口:
[root@localhost ~]# vim/etc/sysconfig/iptables
/**********下面是firewalld的一些命令*****************************/
#systemctl statusfirewalld  //查看状态,看电脑上是否已经安装firewalld
#yum installfirewalld  //安装firewalld防火墙
#systemctl startfirewalld.service   //开启防火墙
#systemctl stop firewalld.service  //关闭防火墙
#systemctl enable firewalld.service //设置开机自动启动
#systemctl disable firewalld.service  //设置关闭开机制动启动
#firewall-cmd--reload  //在不改变状态的条件下重新加载防火墙
启用某个服务
#firewall-cmd --zone=public --add-service=https  //临时
#firewall-cmd --permanent --zone=public --add-service=https  //永久
开启某个端口
#firewall-cmd--permanent --zone=public --add-port=8080-8081/tcp  //永久
#firewall-cmd  --zone=public --add-port=8080-8081/tcp   //临时
查看开启的端口和服务
#firewall-cmd--permanent --zone=public --list-services   //服务空格隔开 例如 dhcpv6-client https ss  
#firewall-cmd--permanent --zone=public --list-ports //端口空格隔开  例如 8080-8081/tcp 8388/tcp 80/tcp
#systemctl restartfirewalld.service  //修改配置后需要重启服务使其生效
#firewall-cmd--zone=public --query-port=8080/tcp //查看服务是否生效(例:添加的端口为8080)
/**********下面是systemctl的一些命令*******************************/
        观察iptables和firewalld使用的两组命令,发现三个常用的命令:service、chkconfig、systemctl。那么它们分别是做什么的呢?(去网上搜索了一下给出了答案)
        systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起。
任务 旧指令 新指令 使某服务自动启动 chkconfig --level 3 httpd on systemctl enable httpd.service 使某服务不自动启动 chkconfig --level 3 httpd off systemctl disable httpd.service 检查服务状态 service httpd status systemctl status httpd.service(服务详细信息)  systemctl is-active httpd.service(仅显示是否 Active) 显示所有已启动的服务 chkconfig --list systemctl list-units --type=service 启动某服务 service httpd start systemctl start httpd.service 停止某服务 service httpd stop systemctl stop httpd.service 重启某服务 service httpd restart systemctl restart httpd.service
总结:
        记是记不住的,实操才可以,熟能生巧。
        抓住一个问题,深入去挖,往往能挖出一片,从而扫清一片盲点。深挖能出清泉。
参考文章: 
https://www.vkilo.com/rhel-7-iptables-service.html
http://blog.csdn.net/Joe68227597/article/details/75207859 
http://www.linuxidc.com/Linux/2012-06/63111.htm
http://man.linuxde.net/systemctl
技术小结
关注
关注
18
点赞
36
收藏
打赏
10
评论
CentOS 7 :Failed to start IPv4 firewall with iptables.
用iptables开启防火墙报错: Failed to start  IPv4 firewall with iptables.     错误原因:因为centos7.0默认不是使用iptables方式管理,而是firewalld方式。CentOS6.0防火墙用iptables管理。        解决办法有两个:使用firewalld方式。或者关闭firewalld,然
复制链接
扫一扫
专栏目录
CentOS 7 防火墙和端口配置
weixin_34320724的博客
10-03
84
centos 7 防火墙和端口配置--解决 RHEL 7/ CentOS 7/Fedora 出现Unit iptables.service failed to load# 第一步,关闭firewall:CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
systemctl stop firewalld.service     #停止firewal...
用iptables开启防火墙报错 Failed to start IPv4 firewall with iptables.
vuvivian的博客
12-24
1931
错误原因:因为centos7.0默认不是使用iptables方式管理,而是firewalld方式。CentOS6.0防火墙用iptables管理。
解决办法有两个:使用firewalld方式。或者关闭firewalld,然后安装iptables。 安装iptables失败 采用另一种。
增加端口号
①新增永久端口 firewall-cmd --zone=public --add-port=808...
评论 10
您还未登录,请先
登录
后发表或查看评论
CentOS7 误删 passwd,导致启动报错 Failed to start Login Service
weixin_45684629的博客
11-08
329
CentOS7误删passwd导致系统无法启动,出现Failed to start Login Service
CentOS 7 :Failed to start IPv4 firewall with iptables
小妖666个人笔记
01-11
484
关闭firewalld:
systemctl stop firewalld
systemctl mask firewalld
使用iptables服务:
#开放443端口(HTTPS)
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
#保存上述规则
service iptables save
#开启服务
systemctl resta...
CentOS 7 :Failed to start IPv4 firewall with iptables.
weixin_42325823的博客
04-21
529
用iptables开启防火墙报错: Failed to start IPv4 firewall with iptables.
错误原因:因为centos7.0默认不是使用iptables方式管理,而是firewalld方式。CentOS6.0防火墙用iptables管理。
解决办法有两个:使用firewalld方式。或者关闭firewalld,然后安装iptables。
一、...
CentOS 7.2:Failed to start IPv4 firewall with iptables
Faith的博客
07-03
2058
这个问题整了我一天,真心没有感觉firewall有哪里好用了,除了麻烦还是麻烦,就像直接卸载掉,但是貌似不能卸载,只能禁用了,禁用后iptable也么有法用,直接报错:● iptables.service - IPv4 firewall with iptables Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled...
centos7 安装mysql8_CentOS7中安装MySQL8.0.21爬坑记录
weixin_39980298的博客
11-28
240
在CentOS7.3中安装了MySQL8.0.21之后,就开启了一段漫长的爬坑历程,简要回顾如下:一、从Win10中用Navicat连接安装好的MySQL服务器出现如下异常:1045 - Access denied for user ‘root’@‘192.168.101.151’(using password: YES)二、尝试解决遇到的防火墙问题在网上查阅了多篇博客,结论可能是3306端口没有...
用iptables开启防火墙报错: Failed to start IPv4 firewall with iptables.
weixin_39092584的博客
10-09
504
用iptables开启防火墙报错: Failed to start IPv4 firewall with iptables.
解决办法有两个:使用firewalld方式。或者关闭firewalld,然后安装iptables。
一、关闭firewalld,安装iptables过程:
停止并屏蔽firewalld:
systemctl stop firewalld
syst...
CentOS 7firewall防火墙配置
建伟博客
07-06
3846
CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙
CentOS 7/8 安装启动iptables.services信息包过滤系统报错
一宿君
05-14
680
IPTABLES 是与最新的 3.5 版本 Linux 内核集成的 `IP 信息包过滤系统`。如果 Linux 系统连接到因特网或 LAN、服务器或连接 LAN 和因特网的代理服务器, 则该系统有利于在 Linux 系统上更好地控制 `IP 信息包过滤`和`防火墙配置`。
CentOs7防火墙操作
百里城墙的博客
07-24
102
1. 查看防火墙状态,如果状态是dead 则表示未开启
systemctl status firewalld
2. 开启防火墙
systemctl start firewalld
3. 关闭防火墙
systemctl stop firewalld
4. 查看已开放的端口号
firewall-cmd --zone=public --list-ports
5. 重启防火墙
firewall-cmd --reload # 不改变任何状态 firewall-cmd --complete-
linux inactive,Loaded:loaded(/usr/lib/systemd/system/iptables.service;enabled)Active: inactive
weixin_31597881的博客
05-25
634
[iyunv@localhost ~]# service iptables startRedirecting to /bin/systemctl startiptables.service[iyunv@localhost ~]# /bin/systemctl startiptables.service[iyunv@localhost ~]# service iptables statusR...
CentOS7的Firewall设置
养猫的阿甘
05-27
100
启动:systemctl start firewalld
查看状态:systemctl status firewalld
停止:systemctl disable firewalld
禁用:systemctl stop firewalld
启动一个服务:systemctl start firewalld.service关闭一个服务:systemctlstop firewalld.service重启一个服务:systemctlrestart firewalld.service显示一个服...
CentOS7关闭防火墙
jartins的博客
05-16
424
CentOS6关闭防火墙使用以下命令,
//临时关闭
service iptables stop
//禁止开机启动
chkconfig iptables off
CentOS7中若使用同样的命令会报错,
stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
这是...
Centos7 禁止firewalld并使用iptables 作默认防火墙以及忘记root密码的处理方法
weixin_34174322的博客
10-24
61
一、停止并禁用firewalld
[root@test ~]# systemctl stop firewalld
[root@test ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink...
转 CentOS 7.2:Failed to start IPv4 firewall with iptables
球球博客
06-09
247
系统是centos7.2,且已经安装了iptables服务,但是在执行启动命令后,却报了iptables服务无法正常启动的错误。
启动命令如下:
systemctl start iptables.service
报错如下:
Job for iptables.service failed because the control process exited with error co...
浅谈linux系统firewalld防火墙常用策略(ipv6、ipv4)
最新发布
Mr.Wang的博客
12-08
106
本文以CentOS7系统为例来讲述firewalld防火墙常用命令以及基础策略,主要记录博主日常维护系统常用防火墙命令操作,网络安全需求日益增长,需要大家共同努力维护绿色安全。
ipv4和ipv6显示服务器无响应,将IPv4客户端连接到IPv6服务器:连接被拒绝
weixin_32496547的博客
08-09
685
我正在试验IPv6套接字,尤其是在Windows Vista和更高版本上提供的“双栈”功能,显然在Unix上默认情况下。我发现当我将服务器绑定到特定的IP地址或本地计算机的主机名解析时,我无法接受来自IPv4客户端的连接。当我绑定到INADDR_ANY但是,我可以。将IPv4客户端连接到IPv6服务器:连接被拒绝请为我的服务器考虑下面的代码。你可以看到,我按照创建一个IPv6套接字,那么IPV6_...
Linux 7通过防火墙安全策略修补安全漏洞
latesummer_的博客
05-17
1023
Linux 安全漏洞修复
iptables 配置安全策略
MySQL数据库漏洞
iptables规则配置说明
安全漏洞修补过程中的问题
iptables配置重启后不生效,规则丢失
“相关推荐”对你有帮助么?
非常没帮助
没帮助
一般
有帮助
非常有帮助
提交
©️2022 CSDN
皮肤主题:大白
设计师:CSDN官方博客
返回首页
技术小结
CSDN认证博客专家
CSDN认证企业博客
码龄9年
暂无认证
164
原创
3万+
周排名
125万+
总排名
68万+
访问
等级
1万+
积分
170
粉丝
212
获赞
3337
评论
593
收藏
私信
关注
热门文章
mysql查询时间段内的数据
103070
用例图之参与者、用例间的四种关系
89571
mysql批量修改某字段的值
34339
dubbo的group分组配置
30474
CentOS 7 :Failed to start IPv4 firewall with iptables.
28955
分类专栏
zookeeper
1篇
【数据库】
25篇
【Java基础】
15篇
____多线程
4篇
【算法】
7篇
【linux】
5篇
【软件工程】
2篇
____UML
5篇
【自考】
12篇
数据结构
4篇
【软考】
7篇
设计模式
5篇
【VB】
1篇
____学生信息管理系统-VB
1篇
____机房收费系统-VB版
5篇
____机房收费系统重构-vb.net版
5篇
【.NET】
8篇
____C#
6篇
____机房收费系统合作-C#版
10篇
____新闻发布系统
4篇
【前端】--审美
9篇
____CSS
3篇
____JavaScript
4篇
____easyui
1篇
有复盘才有进步
1篇
研究生
3篇
xml
2篇
MVC
1篇
SSH
5篇
SSM
3篇
springMVC
1篇
【English】--走的更快
3篇
【健身】--遇见更美的自己
1篇
【读书】
1篇
redis
2篇
jvm
5篇
tomcat
2篇
dubbo分组配置
1篇
MongoDB
1篇
最新评论
mysql常用聚合函数
不脱发的计算机学弟:
这也太常用了吧
高德地图打点
qq_37113875:
辣鸡
mysql查询时间段内的数据
司戊:
# 今天
select fullName,addedTime from t_user where to_days(addedTime)>= to_days(now());//这样才是今天的数据[code=sql]
[/code]
红黑树
奔跑的大白啊:
听说红黑树的性能很高哦
并发编程学习一
奔跑的大白啊:
学习了师傅
您愿意向朋友推荐“博客详情页”吗?
强烈不推荐
不推荐
一般般
推荐
强烈推荐
提交
最新文章
高项-精读系列-1信息化和信息系统
并发编程学习一
红黑树
2022年1篇
2021年1篇
2020年1篇
2019年5篇
2018年9篇
2017年40篇
2016年61篇
2015年39篇
2014年14篇
目录
目录
分类专栏
zookeeper
1篇
【数据库】
25篇
【Java基础】
15篇
____多线程
4篇
【算法】
7篇
【linux】
5篇
【软件工程】
2篇
____UML
5篇
【自考】
12篇
数据结构
4篇
【软考】
7篇
设计模式
5篇
【VB】
1篇
____学生信息管理系统-VB
1篇
____机房收费系统-VB版
5篇
____机房收费系统重构-vb.net版
5篇
【.NET】
8篇
____C#
6篇
____机房收费系统合作-C#版
10篇
____新闻发布系统
4篇
【前端】--审美
9篇
____CSS
3篇
____JavaScript
4篇
____easyui
1篇
有复盘才有进步
1篇
研究生
3篇
xml
2篇
MVC
1篇
SSH
5篇
SSM
3篇
springMVC
1篇
【English】--走的更快
3篇
【健身】--遇见更美的自己
1篇
【读书】
1篇
redis
2篇
jvm
5篇
tomcat
2篇
dubbo分组配置
1篇
MongoDB
1篇
目录
评论 10
被折叠的 条评论
为什么被折叠?
到【灌水乐园】发言
查看更多评论
打赏作者
技术小结
渴望能带给你帮助
¥2
¥4
¥6
¥10
¥20
输入1-500的整数
余额支付
(余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付
您的余额不足,请更换扫码支付或充值
打赏作者
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额
抵扣说明:
1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。 2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。
余额充值