To find the DNS server that received the most DNS requests in the logs, we used tools like cut
, grep
, sort
, uniq
, and head
.
$ cut -d, -f17,20,22 logs.txt | grep '^udp,' | grep ',53$' | cut -d, -f2 | sort | uniq -c | sort -nr | head -n 1
127660 172.16.0.1