Docker Community Forums

Share and learn in the Docker community.

Docker host cannot connect to internet after installation

docker

(Munkeyt) #1

I just installed docker on my Ubuntu 16.04 machine using docker-ce_17.12.0~ce-0~ubuntu_amd64.deb, but right after installation my host computer cannot connect to internet at all. This is the output of my iptables --list command

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all – anywhere anywhere
DOCKER-ISOLATION all – anywhere anywhere
ACCEPT all – anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all – anywhere anywhere
ACCEPT all – anywhere anywhere
ACCEPT all – anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain DOCKER (1 references)
target prot opt source destination

Chain DOCKER-ISOLATION (1 references)
target prot opt source destination
RETURN all – anywhere anywhere

Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all – anywhere anywhere

It has not happened to my previous installations. What happened? Help…


(Logamani) #2
  1. Add the google DNS server in /etc/systemd/resolved.conf file
    sudo nano /etc/systemd/resolved.conf

  2. add the following line
    DNS=8.8.8.8
    FallbackDNS=8.8.4.4

  3. Save and exit the file

  4. Restart the systemd-resolved using the following command
    sudo systemctl restart systemd-resolved