找回密码
 注册
查看: 4322|回复: 0

centos7下firewalld防火墙

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-5-8 10:52:10 | 显示全部楼层 |阅读模式
平常我们使用的更多的是iptables服务,系统存在firewalld服务时,iptables的功能就被限制了,或者我们设置的防火墙规则都失效了。为了让iptables服务生效,我们需要删除系统的firewalld服务。
  D- n. {$ t8 M' A  grpm -qa |grep firewalld###stop firewalld! Y7 u2 b- ~2 U7 E5 W/ l' A* A, M
systemctl stop firewalld.service
1 q: ?7 {$ {/ A/ Z####disable firewalld
1 X0 r/ v6 m- Z  rsystemctl disable firewalld.service, q: m- M; a! K$ }  X# u8 v$ A- c3 S% E
#####remove firewalld
( Y% f9 M% _& j' h& [( Onum2=`rpm -qa |grep firewalld`
+ S7 s2 b% {8 b" i- ~( E' v% {/ x0 a5 U. H
if [ ! -n $num2 ]
# R0 l+ G0 z3 C  f! e" o0 G( }    then
* ^* V* O4 M  F# e, |  rpm -e $num2 5 x6 m$ K4 f0 O* K
   else
. Y2 V3 m* [2 z+ t( [) ^   echo "firewall deleted"
+ w2 ]0 L$ A+ A$ ifi& |2 b: L- o" W. f
* r7 u5 p4 x7 u5 Y( v; F6 C
) @( O. g5 O/ J; a( k3 Q! r
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:54 , Processed in 0.023940 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表