Pi-hole DNS server
A self-hosted Pi-hole on an Ubuntu VM now answers every DNS query on the home network and drops ad and tracker domains before they resolve.
- Date
- Stack
- Pi-hole, Ubuntu Server, DNS, dnsmasq
The finding
Every device on the home network resolves DNS through one Ubuntu VM running Pi-hole, and requests for known ad and tracker domains are answered with nothing.
Context
I wanted network-wide filtering that did not depend on per-device extensions, and a place to actually see what the devices on the network talk to.
What was built
- An Ubuntu Server VM with a static address, running Pi-hole.
- The router’s DHCP scope pointing clients at the Pi-hole as their only resolver.
- Upstream resolution over the Pi-hole with the query log enabled.
Evidence
A quick check from a client that the resolver is in the path:
nslookup doubleclick.net
# Address: 0.0.0.0
What it means
Once every query passes through a point you control, you get two things for free: a block list, and a log of what is phoning home. The second turned out to be more interesting than the first.