After someone ran `iptables -F` (or restarted firewalld), all Docker containers lost outbound connectivity.
IntermediateTroubleshootingContainers, Kubernetes, IPv6 and packet captures
Answer
Likely causes → Docker programs its own iptables chains (DOCKER, DOCKER-USER, NAT MASQUERADE for 172.17.0.0/16). Flushing rules or a firewalld reload removed them, so container traffic is no longer NATed. A reset of net.ipv4.ip_forward=0 has the same effect.
Diagnose →
sudo iptables -t nat -S POSTROUTING | grep MASQUERADE
sudo iptables -S FORWARD | head
sysctl net.ipv4.ip_forward
docker run --rm busybox ping -c2 1.1.1.1
Fix → sudo systemctl restart docker recreates the chains (it restarts containers unless live-restore is set). Re-enable forwarding if needed.
Prevent → Never flush iptables on Docker/Kubernetes hosts; put your own rules in the DOCKER-USER chain and manage host firewalls with tools that preserve Docker's rules.
More on Containers, Kubernetes, IPv6 and packet captures
`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`curl` to a pod IP works, but `curl` to the Service's ClusterIP times out.Intermediate