`tcpdump -i eth0` fails with `tcpdump: eth0: You don't have permission to capture on that device (socket: Operation not permitted)`.
BeginnerTroubleshootingContainers, Kubernetes, IPv6 and packet captures
Answer
Likely causes → Packet capture needs CAP_NET_RAW (and CAP_NET_ADMIN for promiscuous mode). You're not root, or you're in a container that drops those capabilities.
Diagnose →
id
getcap $(which tcpdump)
capsh --print | grep -i net_raw # inside a container
Fix → Run with sudo. In containers, use a debug container with the capability rather than adding it to the app:
docker run --rm -it --net container:myapp --cap-add NET_RAW --cap-add NET_ADMIN nicolaka/netshoot tcpdump -ni eth0
Prevent → Keep a known debugging image (netshoot) and a documented, audited way to use it, instead of shipping tcpdump in app images.
More on Containers, Kubernetes, IPv6 and packet captures
After someone ran `iptables -F` (or restarted firewalld), all Docker containers lost outbound connectivity.Intermediate`docker run -p 8080:80 myapp` starts fine, but `curl localhost:8080` returns `Connection reset by peer`.BeginnerTwo containers on the default bridge network can't reach each other by container name.Beginner`docker run -p 80:80 nginx` fails with `Bind for 0.0.0.0:80 failed: port is already allocated`.BeginnerA new Kubernetes node stays `NotReady` with `container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized`.IntermediateA Service returns `Connection refused` / nothing, and `kubectl get endpoints myapp` shows `<none>`.Beginner