Skip to content

Instantly share code, notes, and snippets.

@retpolanne
Created September 20, 2019 22:27
Show Gist options
  • Save retpolanne/cc7254ba7b6b10ea276b27db6de7a81b to your computer and use it in GitHub Desktop.
Save retpolanne/cc7254ba7b6b10ea276b27db6de7a81b to your computer and use it in GitHub Desktop.

Debugging techniques

TCPDUMP

tcpdump -i eth0 -s 1024 -A

Shows only packets from eth0, size of packet is 1024, -A prints ascii.

TCPDUMP and Docker for Mac

  1. Create a privileged container

docker run -it --pid=host --net=host --privileged ubuntu

  1. Install tcpdump

apt-get update && apt-get install -y tcpdump

  1. TCPDUMP it

tcpdump -i eth0 -s 1024 -A

  1. Run another container

docker run -it t=host ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment