Problem with pihole-unbound Docker container dropping clients

Hello, thanks for the tutorial (at DHCP with docker-compose and bridge networking). I finally got pi-hole with dhcp enabled and unbound dns on docker. However I got 2 problems:

1st - I feel my devices get disconnected from network more often, according to Pihole web UI I have the default 24 hours of lease time, I don't get why this happens more often than before.

2nd - I have a TV box from my ISP provider that only works if I use my Router DNS I tried to add a new line to my 03-dhcp-options.conf but the device doesn't work, I suspect it's still using the unbound DNS instead

Here's my docker-compose file:

version: "3"

services:
  pihole-unbound:
    hostname: pihole
    container_name: pihole-unbound
    image: id3a/pihole-unbound:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: ${PIHOLE_TZ}
      WEBPASSWORD: ${PIHOLE_PW}
      ServerIP: ${PIHOLE_ServerIP}
      ServerIPv6: ${PIHOLE_ServerIPv6}
      DNSMASQ_LISTENING: all
      PIHOLE_DNS_: '127.0.0.1#5335;127.0.0.1#5335;::1#5335;::1#5335'
    volumes:
      - '${PIHOLE_CONF_PATH}/etc-pihole/:/etc/pihole/'
      - '${PIHOLE_CONF_PATH}/etc-dnsmasq.d/:/etc/dnsmasq.d/'
    depends_on:
      - dhcphelper
    cap_add:
      - NET_ADMIN
    dns:
      - '127.0.0.1'
      - ${ROUTER_IP}
    networks:
      app_net:
        ipv4_address: '172.26.0.2'
        ipv6_address: 'fd00::1:0:0:2'
    restart: unless-stopped

  dhcphelper:
    restart: unless-stopped
    container_name: dhcphelper
    network_mode: "host"
    image: homeall/dhcphelper:latest
    environment:
      IP: '172.26.0.2'
    cap_add:
      - NET_ADMIN

networks:
  app_net:
    enable_ipv6: true
    driver: bridge
    ipam:
      config:
        - subnet: 172.26.0.0/16
          gateway: 172.26.0.1
        - subnet: fd00::1:0:0:0/80
          gateway: fd00::1:0:0:1
	  

Thanks

(I've split your post into a new topic as it doesn't contribute directly to the Community HowTo, but rather is a request for help with a combination of Pi-hole and unbound (which the.original topic doesn't consider at all)
Also, you are asking for help with a different container altogether, i.e. you are not using Pi-hole's official image, but seem to be running a third-party image containing Pi-hole and unbound.
)

1 Like

I guess somehow I miscliked and post my reply into a new topic

Hello, thanks for the tutorial (at DHCP with docker-compose and bridge networking). I finally got pi-hole with dhcp enabled and unbound dns on docker. However I got 2 problems:

1st - I feel my devices get disconnected from network more often, according to Pihole web UI I have the default 24 hours of lease time, I don't get why this happens more often than before.

2nd - I have a TV box from my ISP provider that only works if I use my Router DNS I tried to add a new line to my 03-dhcp-options.conf but the device doesn't work, I suspect it's still using the unbound DNS instead

Here's my docker-compose file:

version: "3"

services:
  pihole-unbound:
    hostname: pihole
    container_name: pihole-unbound
    image: id3a/pihole-unbound:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: ${PIHOLE_TZ}
      WEBPASSWORD: ${PIHOLE_PW}
      ServerIP: ${PIHOLE_ServerIP}
      ServerIPv6: ${PIHOLE_ServerIPv6}
      DNSMASQ_LISTENING: all
      PIHOLE_DNS_: '127.0.0.1#5335;127.0.0.1#5335;::1#5335;::1#5335'
    volumes:
      - '${PIHOLE_CONF_PATH}/etc-pihole/:/etc/pihole/'
      - '${PIHOLE_CONF_PATH}/etc-dnsmasq.d/:/etc/dnsmasq.d/'
    depends_on:
      - dhcphelper
    cap_add:
      - NET_ADMIN
    dns:
      - '127.0.0.1'
      - ${ROUTER_IP}
    networks:
      app_net:
        ipv4_address: '172.26.0.2'
        ipv6_address: 'fd00::1:0:0:2'
    restart: unless-stopped

  dhcphelper:
    restart: unless-stopped
    container_name: dhcphelper
    network_mode: "host"
    image: homeall/dhcphelper:latest
    environment:
      IP: '172.26.0.2'
    cap_add:
      - NET_ADMIN

networks:
  app_net:
    enable_ipv6: true
    driver: bridge
    ipam:
      config:
        - subnet: 172.26.0.0/16
          gateway: 172.26.0.1
        - subnet: fd00::1:0:0:0/80
          gateway: fd00::1:0:0:1
	  

Thanks

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