Docker images are unable to connect to the internet. I am behind a corporate firewall, and have done the DNS stuff, in both /etc/default/docker and /etc/resolv.conf

However, I am not even able to access things in my local network. viz: docker run busybox ping -c 1 10.[remainder_of_host_network_ip] fails.

I have performed the steps for resetting the bridge described elsewhere:

pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
docker -d

EXCEPT for the docker -d bit, which seems to be deprecated. If anyone knows what that does, and how to do that now, that might help...

wireshark shows that the following packet just gets repeated a ton of times, and never really resolves:

43 60.451954286 02:42:ac:11:00:02 -> Broadcast    ARP 42 Who has Tell is my docker0 interface. I assume that is the container.

Any thoughts on what is wrong?

migrated from stackoverflow.com Mar 23 '17 at 14:22

This question came from our site for professional and enthusiast programmers.


This iptables -t nat -F may be part of your issue.

You also unconfigured the docker bridge (ifconfig docker0 down) - which is why docker containers cannot find their gateway (

Normally, the docker bridge will be up (you set it down), and would have an IP of, which is the default gateway configured on containers.

Additionally, iptables -vnL -t nat should include a line like: 0 0 MASQUERADE all -- * !docker0

That ensures that hosts on your network see your host IP, rather than the individual docker container IPs.

Possibly the simplest thing to do is restart docker, relaunch your container, and check if that changes anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.