TCP Dump allows you to see what network traffic is coming from and going to a Linux box. It is a great tool for diagnosing network problems and issues.
However, you do run into an interesting issue when you are connected remotely. A TCPDump will show you all network traffic, including your remote connection. This is usually not ideal.
Here is a nifty way to filter out your own traffic. This is assuming you are connecting via ssh to port 22.
tcpdump -i ethX -n not port 22 and not host XXX.XXX.XXX.XXXSo, if you were connected though eth0 from 64.0.0.1
tcpdump -i eth0 -n not port 22 and not host 64.0.0.1
That should filter out port 22 traffic on a given interface for your IP address, allowing you to see traffic, without seeing your own tcp traffic.




