Home Infrastructure · Active

Raspberry Pi + AdGuard Home

A rebuildable guide for deploying network-wide DNS filtering and ad blocking with a Raspberry Pi 4B, Raspberry Pi OS Lite, AdGuard Home, and a Netgear Nighthawk router.

Setup used

Hardware

Raspberry Pi 4B connected to the router. Ethernet is preferred to avoid dual-interface confusion.

OS

Raspberry Pi OS Lite flashed with Raspberry Pi Imager, with SSH enabled during imaging.

Network

Netgear Nighthawk router with AdGuard Home running as the DNS filtering service.

Quick setup

  1. Flash Raspberry Pi OS Lite using Raspberry Pi Imager.
  2. Enable SSH and configure login credentials during imaging.
  3. Boot the Pi and connect it by Ethernet.
  4. Update Raspberry Pi OS.
  5. Find the Pi IP address.
  6. Reserve that IP in the Nighthawk router.
  7. Install AdGuard Home.
  8. Check the installed AdGuard version from CLI.
  9. Open the AdGuard web UI.
  10. Configure upstream DNS.
  11. Test one client manually before changing the whole network.

Core commands

Update the Pi

sudo apt update
sudo apt upgrade -y
sudo reboot

Find the Pi IP address

hostname -I
ip addr

Install AdGuard Home

wget https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_arm64.tar.gz
tar xvf AdGuardHome_linux_arm64.tar.gz
cd AdGuardHome
sudo ./AdGuardHome -s install

Check installed version

AdGuardHome --version
sudo /opt/AdGuardHome/AdGuardHome --version

DNS flow

Ideal client visibility
Client → AdGuard → Upstream DNS

AdGuard can show individual device traffic.

Common Nighthawk behavior
Client → Router → AdGuard

AdGuard may only show the router IP. Filtering can still work.

Netgear Nighthawk caveat

Many Nighthawk routers proxy DNS through the router. As a result, AdGuard may show only the router address instead of each device.

This does not automatically mean AdGuard is broken. DNS filtering and client-level visibility are related but separate problems.

DHCP warning

Do not disable router DHCP until AdGuard has a static IP and AdGuard DHCP is configured. If router DHCP is disabled too early, devices may lose IP addresses and the AdGuard interface may become unreachable.

  1. Reserve the Pi IP first.
  2. Confirm AdGuard is reachable.
  3. Configure AdGuard DHCP if needed.
  4. Only then disable router DHCP.

Troubleshooting

AdGuard only shows the router

Likely cause: router DNS proxying. Test by manually setting one client DNS server to the Pi IP.

AdGuard UI will not load

sudo systemctl status AdGuardHome
sudo systemctl restart AdGuardHome
sudo journalctl -u AdGuardHome -f

Test DNS

nslookup google.com

Lessons learned