Tuesday, March 20, 2012

tcpdump - filter destination port

There are times when you may need to do some network troubleshooting on a *nix box and only have access to tcpdump.

One handy thing to do if your troubleshooting an application is to filter on the destination port so you can zero in just on that application data.  Here is how you could build a filter to capture data based on the destination port 8080 going over interface eth0.

tcpdump -i eth0 dst port 8080