Local DNS
The homelab uses Pi-hole as its primary DNS resolver, but a flat with servers, containers and smart-home devices needs more than ad blocking. A second resolver, CoreDNS, answers a private local domain so services can be reached by name instead of IP. Both layers are fed by fritz-lan-dns, my own service that collects mesh and host data from the FRITZ!Box, stores it in SQLite, and generates DNS records from it.
Why a second DNS layer
- Pi-hole stays primary, every client keeps using Pi-hole for ad and tracker blocking, so nothing changes for normal internet traffic.
- Local names without hosts files, CoreDNS serves names for the private domain from the collected host list, so devices do not need manual entries.
- One source of truth, the FRITZ!Box already knows which device has which address. The service reads that data instead of maintaining a second inventory by hand.
Query flow
Pi-hole answers everything it normally answers and conditionally forwards only the private local domain to CoreDNS:
Client -> Pi-hole -> conditional forward for the local domain
-> CoreDNS
|- known host from dns/hosts -> answer
`- unknown name -> FRITZ!Box fallback -> answer rewritten to the local domain
CoreDNS runs on the same Proxmox host as Pi-hole and only answers the local domain. The fallback keeps names working even before they appear in the generated host list.
Collecting host data
- An hourly TR-064 pull from the FRITZ!Box keeps the database current.
- Mesh topology including LAN, WiFi and Powerline links, WiFi radios, channels and connected clients, and every known host, active or offline.
- A web UI with dashboard, topology, WiFi, hosts, DNS and history views.
- DNS records generated from hostnames and IPs, with conflict detection and source information.
OpenWrt as a second source
Devices that only exist behind the OpenWrt router can be added as a second host source. The service reads DHCP leases and static hosts over ubus, so those devices also resolve under the local domain instead of being invisible to the FRITZ!Box.
Safety model
- CoreDNS answers only the private local domain. Queries for anything else return
REFUSED, so the container is not an open resolver. - Unknown names inside the local domain fall back to the FRITZ!Box, and the answer is rewritten to the original local name.
- The Pi-hole LXC remains the single DNS entry point for clients. The CoreDNS container is only reachable through that delegation.
Where it runs
Pi-hole runs as a lean LXC container on the main Proxmox host. CoreDNS and fritz-lan-dns run as Docker containers on the primary Docker host. See the fritz-lan-dns repository for configuration details.
IP addresses, the actual local domain and credentials are intentionally left out of this page.