[SOLVED: The config below works, but it took a few restarts and 'just waiting' for names to start appearing]
Yes, this sounds like a duplicate post to others, but I've read dozens and none of them have helped since I don't want to manually edit the hosts file in my pihole docker... I want the names to be automatically pulled from the DHCP server.
Configuration:
-
DHCP Server
- Unifi USG
- 'register client hostname from DHCP requests in USG DNS forwarder' enabled
- WAN DNS servers pointing to cloudflare
- DHCP Name Server option set to the IP address of the PiHole as primary, and the USG as the secondary
-
Pi-hole
- Docker container on a Synology, with the container network mode set to host
- PiHole DNS upstream DNS server set to the USG so local domain name resolution works (I have multiple subnets with different domain names)
- Conditional Forwarding is enabled, with the local network CIDR set to cover all my in-use network ranges, and the DHCP server IP address set to the USG, and the optional domain name set to the match the one used by my primary network
- Verified that /etc/resolv.conf on the PiHole shows the nameserver set to my USG and the domain set to the primarly local domain
Things that work:
- From a client machine
- pinging any local machine by its name.domain works correctly for all my domains
- nslookup name.domain shows that the pihole is responding and correctly gives the name and address, again for all my domains
- From bash on the pihole container
- ping name.domain for machines in any domain
- nslookup name.domain works
- nslookup ip.ip.ip.ip correctly responds with ipipipip.in-addr.arpa name = name.domain.
Expected Behaviour:
The "Dashboard : Top Clients (total)", "Long-term data : Top Clients", and other relevant UI elements should show local host names instead of IP addresses.
Actual Behaviour:
IP Addresses are shown.