TCPDump and WireShark


Summary

This is my how-to for using TCPDump and WireShark to debug low-level problems with serving files over http.


Detail

To run tcpdump:

sudo tcpdump -i eth0 -n -w filename.pcap 'tcp port 80'

To look at a http request/response in filename.pcap using WireShark:

ip.src==ip.add.re.ss || ip.dst==ip.add.re.ss

Then:

Right-click -> Follow TCP Stream -> "Filter out this stream"