Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save laszlomiklosik/2397999 to your computer and use it in GitHub Desktop.
Save laszlomiklosik/2397999 to your computer and use it in GitHub Desktop.
Capture packages with tcpdump or tcpflow
# packages from localhost to localhost
sudo tcpdump -vvv -A -i lo port 8080
# packages from localhost to somewhere else
sudo tcpdump -vvv -A host 192.168.1.101
# packages coming and going on a specific port, specific interface
sudo tcpdump -vvv -A -i eth0 'port 8080'
# packages coming and going on a specific port, any interface
sudo tcpdump -vvv -A -i any 'port 8080'
# tcpflow: all on given interface and port
tcpflow -c -i eth0 port 8080
# tcpflow: all on any interface and on a given port
tcpflow -c -i any port 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment