Can no longer access router login or webpages after changing DNS server

Expected Behaviour:

Pihole serving as a DNS server and Adblock for my home network via docker on a laptop connected via WiFi

  • OS: Ubuntu 20.04 (Docker)
  • Router: CenturyLink C4000XG

Actual Behaviour:

I installed pihole via docker on github on a linux laptop connected to my CenturyLink C4000XG router, then followed this advice to change the two lines mentioning port 53 to use the format LOCAL-IP:PORT:PORT, as shown below in my docker-compose-yml. I was then able to connect to the web UI and login to pihole.

Then I went into my router to changed the primary DNS server address to the address of the machine running docker-pihole (192.168.0.5) and left secondary DNS empty.

Now I can’t load my router login page to revert the settings or any webpages on any devices. Other devices are able to "connect" to the network but not load any webpages, while the laptop that is/was running pihole can't connect to the network at all.

I tried stopping and starting docker-pihole and now I get this error message:

$ docker-compose up
Creating network "docker-pi-hole_default" with the default driver
Creating pihole ... 
Creating pihole ... error

ERROR: for pihole  Cannot start service pihole: driver failed programming external connectivity on endpoint pihole (e127c087c6296f2f41a0e1596600005c8df48e3ee14a6db14ba1fb711f1ac74b): Error starting userland proxy: listen tcp4 192.168.0.5:53: bind: cannot assign requested address

ERROR: for pihole  Cannot start service pihole: driver failed programming external connectivity on endpoint pihole (e127c087c6296f2f41a0e1596600005c8df48e3ee14a6db14ba1fb711f1ac74b): Error starting userland proxy: listen tcp4 192.168.0.5:53: bind: cannot assign requested address
ERROR: Encountered errors while bringing up the project.

How can I unbreak this?

My docker-compose.yml:

version: "3"

# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "192.168.0.5:53:53/tcp"
      - "192.168.0.5:53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
    environment:
      TZ: 'America/Chicago'
      WEBPASSWORD: 'xxx'
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN
    restart: unless-stopped # Recommended but not required (DHCP needs NET_ADMIN)

From the host that is running Docker, please share the result of the following command:

ip -4 address

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.