發新話題
打印

[轉貼]通过查看FortiGate连接表进行故障定位

[轉貼]通过查看FortiGate连接表进行故障定位

http://support.fortinet.com.cn/index.php?m=content&c=index&a=show&catid=27&id=175
适用范围所有的FortiGate设备。说明本文描述的是FortiGate详细的连接表信息。通过FortiGate的Web管理界面我们可以从FortiGate的Web管理界面查看防火墙连接表信息,如下图:(点击放大)(点击放大)通过FortiGate的命...

适用范围

所有的FortiGate设备。

说明

本文描述的是FortiGate详细的连接表信息。

通过FortiGate的Web管理界面

我们可以从FortiGate的Web管理界面查看防火墙连接表信息,如下图:
1
(点击放大)
2
(点击放大)

通过FortiGate的命令行界面

从命令行界面可以得到比Web界面更加详细的连接表信息,具体命令是:diagnose sys session list
FGT # diagnose sys session list

同样可以设置连接表查看过滤器,具体如下显示:
   FGT # diagnose sys session filter <options>
   相关的过虑选项有:
    clear    clear session filter
dport      dest port
dst        dest ip address
negate     inverse filter
policy     policy id
proto      protocol number
sport      source port
src        source ip address
vd         index of virtual domain. -1 matches all

清除选定的防火墙连接命令如下:
   FGT # diagnose sys session clear

如下是具体的防火墙连接表信息描述,如下图显示了命令行下显示出来的具体的连接表:
3
(点击放大)
其中对于TCP协议中的proto_state字段对应的值的含义如下 :

TCP 状态

 默认超时时间

 NONE

 0

 60 s

 ESTABLISHED

 1

 3600 s

 SYN_SENT

 2

 120 s

 SYN & SYN/ACK

 3

 60 s

 FIN_WAIT

 4

 120 s

 TIME_WAIT

 5

 120 s

 CLOSE

 6

 10 s

 CLOSE_WAIT

 7

 120 s

 LAST_ACK

 8

 30 s

 LISTEN

 9

 120 s



其中对于UDP协议中的proto_state字段对应的值的含义如下 :
对于所有的UDP协议,FortiGate都记录了UDP的2种状态:
State                Value
UDP   reply not seen    0
UDP  reply seen        1

状态0,之后一个方向的UDP报文到达FortiGate:
session info: proto=17 proto_state=00 expire=179 timeout=3600 use=3
bandwidth=0/sec guaranteed_bandwidth=0/sec      traffic=0/sec   prio=0
logtype=session ha_id=0 hakey=42691
tunnel=/
state=local
statistic(bytes/packets): org=7685450/17248 reply=237440/4240 tuples=2
orgin->sink: org out->post, reply pre->in oif=0/5
gwy=0.0.0.0/10.250.250.250
hook=out dir=org act=noop
10.250.250.250:1025->192.168.171.201:514(0.0.0.0:0)
hook=in dir=reply act=noop
192.168.171.201:514->10.250.250.250:1025(0.0.0.0:0)
misc=0 domain_info=0 auth_info=0 cerb_info=0 ids=0 vd=0 serial=0006d655 tos=00/00

状态 1,双向UDP包都已经到达FortiGate:
session info: proto=17 proto_state=01 expire=22 timeout=3600 use=3
bandwidth=0/sec guaranteed_bandwidth=0/sec      traffic=0/sec   prio=0
logtype=session ha_id=0 hakey=42650
tunnel=/
state=local may_dirty
statistic(bytes/packets): org=590/5 reply=822/6 tuples=2
orgin->sink: org pre->in, reply out->post oif=5/2
gwy=10.250.250.250/0.0.0.0
hook=pre dir=org act=noop
192.168.171.160:33712->10.250.250.250:161(0.0.0.0:0)
hook=post dir=reply act=noop
10.250.250.250:161->192.168.171.160:33712(0.0.0.0:0)
misc=0 domain_info=0 auth_info=0 cerb_info=0 ids=0 vd=0 serial=000ae073 tos=ff/ff

其中对于ICMP协议中的proto_state字段对应的值的含义如下 :
FortiGate不没有关于ICMP协议的状态值,proto_state值始终是00。

我们可以从防火墙的连接表里面得到如下更具体的连接表信息:

 状态

含义

 log

连接已经记录日志

 local

连接一端是FortiGate本身

 ext

这是一个子连接,附属于某一个主连接,具有和主连接相同的属性

 may_dirty

创建于防火墙策略,通常是主连接,子连接没有此状态

 ndr

此连接启用了IPS特征检查功能

 nds

此连接启用了IPS异常检查功能

 br

此连接建立防火墙透明模式

 npu

此连接将被NPU处理器加速

 wccp

此连接将被WCCP模块处理(FortiOS4.0)

 

下面是具有多个标志信息的连接表举例: 
session info: proto=6 proto_state=11 expire=3527 timeout=3600 use=3
bandwidth=0/sec guaranteed_bandwidth=0/sec      traffic=0/sec   prio=0
logtype=session ha_id=1 hakey=0
tunnel=/
state=redir log may_dirty ndr nds br
statistic(bytes/packets): org=48/1 reply=0/0 tuples=2
orgin->sink: org pre->post, reply pre->post oif=6/8
gwy=194.199.143.130/193.251.169.175
hook=pre dir=org act=noop
193.251.169.175:3761->194.199.143.130:25(0.0.0.0:0)
hook=post dir=reply act=noop
194.199.143.130:25->193.251.169.175:3761(0.0.0.0:0)
set=2: 10.0.0.1, 10.0.0.2,
pos/(before,after) 0/(0,0), 0/(0,0)
misc=20004 domain_info=0 auth_info=0 cerb_info=0 ids=0 vd=0 serial=1babac4b tos=ff/ff


TOP

發新話題