Project write-up

Self-hosted DNS with AdGuard Home

A DNS server I run myself, so every device on my main network gets ad, tracker and threat blocking, and my homelab gets a place for internal names.

AdGuard HomeUbuntuNodeWeaverDNS-over-HTTPSQuad9

Goal

I wanted ads, trackers and known threats blocked for every device on my main network without installing anything on the devices themselves. I also needed a DNS server I control, so my homelab services can have internal names.

Setup

The guest network doesn't use it.

What I did, and why

  1. Gave DNS its own VM. AdGuard Home runs on Ubuntu in a dedicated virtual machine on my NodeWeaver homelab, independent of my other lab services.
  2. Reserved its IP address. A DHCP reservation keeps the VM's address from changing, so the router can always hand it out as the network's DNS server.
  3. Pointed the router's DHCP at it. Every device on the main network picks it up automatically, with nothing to configure on phones, laptops or smart devices.
  4. Kept the guest network off it. Guests stay separate from my homelab, and if a blocklist ever causes problems, visitors aren't affected.
  5. Chose three complementary blocklists. HaGeZi Pro covers ads and tracking, HaGeZi Threat Intelligence Feeds covers malware and phishing, and OISD Big adds broad, well-maintained coverage with few false positives.
  6. Encrypted the upstream. Queries leave my network as DNS-over-HTTPS to Quad9, so my ISP can't read or tamper with them.
  7. Used Quad9's unfiltered service on purpose. I chose the variant without Quad9's own threat blocking, so every block happens in AdGuard Home, where I can see it in the query log and allowlist it if needed. Quad9 still validates DNSSEC.
  8. Set a fallback inside AdGuard, not on the router. 1.1.1.1 is configured as AdGuard Home's fallback, used only if Quad9 can't be reached. Devices treat a second DNS server from the router as an equal choice, which would let some lookups skip filtering.

Results

24%

of DNS queries blocked, per the AdGuard Home dashboard

0

false positives so far that needed allowlisting

Lessons

Next steps

← Back to portfolio