DNS Not Resolving for other devices on network (Docker)

Expected Behaviour:

DNS to resolve for other devices on the network

Actual Behaviour:

DNS isn't resolving for other devices on the network. If i set the host machine DNS to the containers IP Address DNS does resolve and i see logs in the admin dashboard

Debug Token:

https://tricorder.pi-hole.net/2uFBcvsN/

Docker Compose File

version: "3"
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "54:53/tcp"
      - "54:53/udp"
      - "81:80/tcp"
    environment:
      TZ: 'Europe/London'
      DNSMASQ_USER: root
      WEBPASSWORD: '*******'
      FTLCONF_REPLY_ADDR4: 192.168.0.32
      DNS1: 1.1.1.1
      DNS2: 1.0.0.1
    volumes:
      - /opt/pihole/config:/etc/pihole
      - /opt/pihole/dnsmasq.d:/etc/dnsmasq.d 
    restart: unless-stopped
    networks:    
      - letsencrypt_internal    
     
networks: 
  letsencrypt_internal: 
    external: 
      name: letsencrypt_internal    

DNS is set to permit all origins.

Couple of questions
Should the FTLCONF_REPLY_ADDR4 be the Host IP or the Container IP?
Should i be setting the DNS to the Host IP? or the Container IP?

See our documentation for Pi-hole's Docker environment-variables.

Note that DNS1 and DNS2 are deprecated.
Instead, you should use PIHOLE_DNS_ to specifiy a list of upstream DNS servers for your Pi-hole container.

That would only work for clients that have been explicitly manually configured to use port 54 for DNS requests (and most clients rarely expose a way of configuring a diverging DNS port).

All other clients will always use standard port 53 for DNS.

Hmm good to know about the DNS Stuff, I've remove it and will just set in the admin panels anyways.

As for the Port binding. 53 is already bound.

Error starting userland proxy: listen tcp4 0.0.0.0:53: bind: address already in use

Just Attempted this and it works.

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