Debugging with tcpdump and IPTraf
Another very handy tool to control traffic is tcpdump
. As a network sniffer, tcpdump
is often used by administrators or hackers to collect the data exchanged on the network. tcpdump
prints all traffic that passes the interface given as a parameter. The following example shows the usage of tcpdump
. When called with the options -n
and -i eth1
, tcpdump
will listen on interface eth1
and give a numeric output (without resolving DNS):
debian01:~# tcpdump -n -i eth1 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes 21:00:16.640142 IP 192.168.250.128 > 172.16.76.128: ICMP echo request, id 55298, seq 0, length 64 21:00:16.648116 IP 172.16.76.128 > 192.168.250.128: ICMP echo reply, id 55298, seq 0, length 64 21:00:17.678429 IP 192.168.250.128 > 172.16.76.128: ICMP echo request, id 55298, seq 256, length 64 21:00:17.680701 IP 172.16.76.128 > 192.168.250.128...