The original post: /r/pihole by /u/javierguzmandev on 2024-10-27 17:08:28.

Hello all,

I have successfully made Pihole work on Docker with host network mode within my Synology NAS. My router is now giving all my devices my NAS’s IP as DNS (192.168.1.2) and if I do a nslookup it works ok returning this IP.

However, I have other containers running on NAS in bridge mode, for example, uptime kuma and I’m not able to get the DNS work within those containers. My understanding is that bridge mode are isolated networks, however, I would have thought there is a way to make communicate with the host, at least for the dns. I mean, if I don’t specify anything in a docker bridge mode, am not using the host’s dns automatically? Is there a way to make this work in an easy way?

My pihole compose:

version: ‘3.7’

services: pihole: container_name: pihole-dns image: pihole/pihole:2024.07.0 hostname: pi.hole restart: always network_mode: host dns: - 127.0.0.1 - 1.1.1.1 environment: - WEB_PORT=8080 - WEBPASSWORD=blablabla - WEB_BIND_ADDR=192.168.1.2 - TZ=Europe/Madrid - DNSMASQ_USER=root - DNSMASQ_LISTENING=local - FTLCONF_LOCAL_IPV4=192.168.1.2 volumes: - /volume1/docker/pihole/dnsmasq.d:/etc/dnsmasq.d - /volume1/docker/pihole/pihole:/etc/pihole


I run uptime kuma with something similar to this:

docker run -d --name=uptime_kuma
-p 3444:3001
-e TZ=Europe/Madrid
–network custom_network
-v /volume1/docker/uptimekuma:/app/data
-v /var/run/docker.sock:/var/run/docker.sock
–restart always
louislam/uptime-kuma


I would appreciate any clue or hint about this. Thank you in advance and regards