Tcpdump inside a container netns from host namespaces

Sniff a container's traffic using host's tcpdump via its netns; no tools needed in image

PID=$(docker inspect -f '{{.State.Pid}}' <name>); nsenter -t $PID -n tcpdump -ni any -c 50
more namespaces all 4 commands →