- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
平常我们使用的更多的是iptables服务,系统存在firewalld服务时,iptables的功能就被限制了,或者我们设置的防火墙规则都失效了。为了让iptables服务生效,我们需要删除系统的firewalld服务。9 q- ^- Z3 a2 Q) W3 P P4 [( @$ t
rpm -qa |grep firewalld###stop firewalld
5 X1 X5 Q) l: T& S% Lsystemctl stop firewalld.service
5 \" U# s( p& S0 D* d( d, Z####disable firewalld
2 G. p9 Z& b! T6 F8 a2 ?systemctl disable firewalld.service$ ^ h3 W4 ?) O) d
#####remove firewalld
1 ?7 @6 I5 @$ c/ c1 N. y8 K4 E+ gnum2=`rpm -qa |grep firewalld` x* ?) _ X7 j, U0 H e
; \6 ?; Q" \/ p6 ?; b/ h( r
if [ ! -n $num2 ]; U* b+ ]8 A: y
then
3 J# _7 t6 q0 ?' G" r rpm -e $num2
. k3 @- d+ ~8 z5 m+ t else ) f! E G; A+ k2 z% O
echo "firewall deleted"1 s8 { c4 @7 U$ z( Z# K. W$ }3 F( N, x
fi
4 x" e/ ?- [3 U6 [0 A* ~6 {5 x+ y
3 e: L% w+ p; p$ W* A9 }9 h, N
' y4 k$ [3 u+ ~7 S2 |" R |
|