Suse 防火墙

suse 11防火墙

环境

SUSE Linux Enterprise Server 11 SP3 (x86_64)

启动和关闭防火墙服务

#停止服务
node01:~ # rcSuSEfirewall2 stop
#或
node01:~ # service SuSEfirewall2_init stop   
node01:~ # service SuSEfirewall2_setup stop   
Shutting down the Firewall     

#查看服务状态
node01:~ # service SuSEfirewall2_init status 
Checking the status of SuSEfirewall2                                                                                                              running
node01:~ # service SuSEfirewall2_setup status 
Checking the status of SuSEfirewall2                                                                                                              running
#或
node01:~ # service SuSEfirewall2_setup status
Checking the status of SuSEfirewall2                                                                                                              running

#启动服务
node01:~ # rcSuSEfirewall2 start
Starting Firewall Initialization (phase 2 of 2)                                                                                                   done
#或
node01:~ # service SuSEfirewall2_init start 
Starting Firewall Initialization (phase 1 of 2)
node01:~ # service SuSEfirewall2_setup start 
Starting Firewall Initialization (phase 2 of 2) 

#设置开机自启动
node01:~ # chkconfig SuSEfirewall2_init on
insserv: Service network is missed in the runlevels 4 to use service nimbus
node01:~ # chkconfig SuSEfirewall2_setup on
insserv: Service network is missed in the runlevels 4 to use service nimbus

#关闭开机自启动
node01:~ # chkconfig SuSEfirewall2_setup off
node01:~ # chkconfig SuSEfirewall2_init off

#查看开机启动情况
node01:~ # chkconfig SuSEfirewall2_init --list 
SuSEfirewall2_init        0:off  1:off  2:off  3:off  4:off  5:off  6:off
node01:~ # chkconfig SuSEfirewall2_setup --list  
SuSEfirewall2_setup       0:off  1:off  2:off  3:off  4:off  5:off  6:off

suse 12防火墙

环境

SUSE Linux Enterprise Server 12 SP3 (x86_64)

启动和关闭防火墙服务

#关闭防火墙
systemctl stop SuSEfirewall2.service
#取消开机启动防火墙
systemctl disable SuSEfirewall2.service

#开启防火墙
systemctl enable SuSEfirewall2.service
#开机启动防火墙
systemctl start SuSEfirewall2.service

#查看状态
systemctl status SuSEfirewall2.service

问题: suse11 防火墙关不掉

环境

SUSE Linux Enterprise Server 11 SP3 (x86_64)

现象

#执行防火墙服务关闭命令后,服务状态仍为running
node01:~ # service SuSEfirewall2_init status 
Checking the status of SuSEfirewall2                                                                                                              running
node01:~ # service SuSEfirewall2_init stop   
node01:~ # service SuSEfirewall2_setup stop   
Shutting down the Firewall                                                                                                                        done
node01:~ # service SuSEfirewall2_setup status
Checking the status of SuSEfirewall2                                                                                                              running

分析

可能原因为防火墙服务卡死,解决访问为找到防火墙服务对应的进程,kill掉对应的进程

#根据服务名关键词查找进程不存在
node01:~ # ps -ef |grep -i wall
root     11053  8735  0 11:22 pts/1    00:00:00 grep -i wall
node01:~ # ps -ef |grep -i fire
root     11063  8735  0 11:22 pts/1    00:00:00 grep -i fire
node01:~ # 

查看日志
/var/log/message

#执行关闭服务时,message中报错如下
node01:~ # tailf /var/log/message
Jan 18 12:15:16 node01 SuSEfirewall2: /var/lock/SuSEfirewall2.booting exists which means system boot in progress, exit.

#/var/lock/SuSEfirewall2.booting 文件存在导致服务停止失败
#查看文件对应的进程
node01:~ # fuser /var/lock/SuSEfirewall2.booting 
node01:~ # 
#没有进程,说明该文件无关联进程,删除文件
node01:~ # rm -f /var/lock/SuSEfirewall2.booting 
#再次关闭服务即可
node01:~ # rcSuSEfirewall2 stop
node01:~ # rcSuSEfirewall2 status               
Checking the status of SuSEfirewall2                                                                                                              unused

反思

解决问题思路

问问题
  1. 该问题什么时候出现的?
  2. 问题出现之前正常吗?
  3. 问题出现之前有做变更吗?出现后有做变更吗?如有,具体什么变更?
分析问题

先看对应的日志,根据日志分析可能的原因

解决问题
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值