首先在f5上tcpdump抓包
tcpdump -i External tcp[13]==4 and dst host  [服务所在ip] and port 80
参数tcp[13]==4:tcp flags为tcp-rst(异常的请求)
将输出内容传到本地,假设文件名:logabc
创建脚本shell.sh内容如下:
#!/bin/sh
cat $1 | awk '{print $2}' | awk -F "." '{print $1"."$2"."$3"."$4}' |sort -nr |uniq -c |sort -nr |uniq -c | head -n 200 > answerof$1
#EOF
 
so,执行命令./shell.sh logabc
就可以在文件answeroflogabc中看到异常请求的ip
 
 
这是针对固定ip的***,如果***伪装了ip则不适用这种方法。