乐趣区

关于tcpdump:tcpdump抓取客户端IP

一、简略疾速抓取客户端 IP

tcpdump tcp -i eth1  port 9200 >> /tmp/tcpdump.log
less /tmp/tcpdump.log | grep 127.0.0.1 | awk '{print $3}' | grep -v '127.0.0.1' | awk -F . 'OFS="."{$NF="";print}' | sort | uniq -c | sort -nr
退出移动版