Thursday, November 17, 2011

tcpdump Howto

$ tcpdump -i eth0 -w outputfile // listen on interface eth0, and write all the traffic to outputfile, may need root privilege.

$ tcpdump -r outputfile > textfile // read the raw traffic and put it into textfile

tcpdump -r tcpdump2 -tt > textfile2 // flag -tt mean don't format the time

More: man tcpdump

No comments: