Skip to content

Instantly share code, notes, and snippets.

@bluecmd
Created July 31, 2022 09:54
Show Gist options
  • Save bluecmd/6cafcf584707c4088edec22853b5642e to your computer and use it in GitHub Desktop.
Save bluecmd/6cafcf584707c4088edec22853b5642e to your computer and use it in GitHub Desktop.
PCAP a docker container
sudo nsenter --net=$(docker inspect --format='{{.NetworkSettings.SandboxKey}}' $(docker ps | awk '/the-container-name/ {print $1}')) tshark -i eth0 -n -w /tmp/capture.pcap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment