I have a DNS server and I want to capture DNS traffic to get all the IPs which use my DNS server.
For this I start using following tcpdump
command and capture them to a file:
tcpdump -n -i eth0 dst port 53 >> dns_data.log
But the file size is high when I run this for long time. How can I capture this to a compress file? I tried below command but its not working.
tcpdump -n -i eth0 dst port 53 | bzip2 -c >> dns_data.bz2