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

centos7下firewalld防火墙

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-5-8 10:52:10 | 显示全部楼层 |阅读模式
平常我们使用的更多的是iptables服务,系统存在firewalld服务时,iptables的功能就被限制了,或者我们设置的防火墙规则都失效了。为了让iptables服务生效,我们需要删除系统的firewalld服务。% ]4 t' I9 O) V, p) D) y+ C8 r
rpm -qa |grep firewalld###stop firewalld" ?$ R' r! @8 I' @( j1 b$ u! [; A
systemctl stop firewalld.service3 g. K# D1 H! \) b! e3 l' ^$ j
####disable firewalld
8 l8 Y2 h5 J( @5 ~3 s/ J$ ~# c. msystemctl disable firewalld.service
( H. l5 x) {6 C9 L9 i& u  J' g#####remove firewalld
$ R2 O) Z$ _: W; I, u. j, xnum2=`rpm -qa |grep firewalld`
( h0 u4 s2 a2 |& [  r, ?, m1 K" p
4 r* e/ U3 W0 ~if [ ! -n $num2 ]7 s8 i, z6 X. s' Z% w2 j( G
    then
9 k6 A4 M- U6 K; F  E# V8 V' K  rpm -e $num2
& ^2 m! Z! n; {6 h   else
* A+ ^8 Y! B$ B4 N; U0 e) Q   echo "firewall deleted". E, v# I+ k/ }& Y& V
fi
: x# ?1 y  Y1 P# e! Z. ?3 X6 X" O9 h( ]$ K- w$ n5 h- a! y

& m/ B$ N2 R  d( [
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 03:00 , Processed in 0.019151 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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