2018年3月1日星期四

ASA 5512 的拒绝服务故障排错

最近ASA 5512总是经过一段时间就不能工作,外网连接不上,经常报错误

%ASA-5-321001: Resource 'conns' limit of 100000 reached for system

通过show resource usage 看conns的当前数值以及最高峰值

Resource                 Current        Peak      Limit        Denied Context
SSH                            1           2          5             0 System
ASDM                           0           1         30             0 System
Syslogs [rate]               124       12661        N/A             0 System
Conns                      19340       19504     100000             0 System
Xlates                     13410       13531        N/A             0 System
Hosts                       4977        4977        N/A             0 System
Conns [rate]                  73         729        N/A             0 System
Inspects [rate]               29         728        N/A             0 System
Routes                         7          10  unlimited             0 System
 
登录防火墙,并且在xshell等终端把缓冲设置到最大值200000
show conn 通过xshell,编辑-->记事本-->全部
把数据导出到文本,然后放入linux shell下进行分析

查看源IP地址,这里得出的总数值 约等于 show resouce usage 的 conns 当前值
cat conn.txt | awk '{print $5}' | awk '{FS = ":"}; {print $1}' | sort -n | uniq -c | sort -nr | head -10
查看目的IP地址
cat conn.txt | awk '{print $3}' | awk '{FS = ":"}; {print $1}' | sort -n | uniq -c | sort -nr | head -10

查看单个IP的连接数
show local-host 172.16.5.163 brief

清除所有连接
clear local all

如果需要快速将问题机器从网络中取出,您可以执行以下操作:

shun xxx.xxx.xxx.xxx
要扭转这种情况:

no shun xxx.xxx.xxx.xxx








参考链接:
1. cisco asa top connection