Bookmark

Install AdGuard Home on an OpenWrt Router

AdGuard Home can act as a network DNS server that centrally filters ads and tracking domains. This article adapts the direct-on-router installation flow for OpenWrt; check RAM, flash storage, and the current owner of DNS port 53 before starting.

Source reference: i12bretro – Install AdGuard Home on an OpenWRT Router . The original video belongs to i12bretro on YouTube .

Youtube video player

Requirements

  • An OpenWrt router with working LuCI and SSH access.
  • The router CPU architecture: arm32, arm64, mipsel, or another supported target.
  • Enough storage for the binary, filters, query logs, and statistics.
  • The router IP address, SSH credentials, and a management computer.

AdGuard Home normally needs DNS port 53 to receive queries directly. Dnsmasq or another resolver may need to move to a different port, so inspect the current services before stopping anything.

Install dependencies

  1. Open LuCI and log in.
  2. Go to System > Startup.
  3. Find dnsmasq, click Stop, and disable Enabled for this test setup.
  4. Open System > Software.
  5. Search for and install:
    • ca-certificates
    • ca-bundle
    • libustream-openssl

Download and install AdGuard Home

  1. Open the AdGuard Home Getting Started page.
  2. Select the Linux binary matching the router architecture.
  3. Copy its download URL.
  4. SSH into the router and run the following commands, replacing the URL and filename with the downloaded architecture:
1
2
3
4
wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz --no-check-certificate
tar xfvz AdGuardHome_linux*
cd AdGuardHome
./AdGuardHome -s install

AdGuardHome_linux_amd64.tar.gz is only an example. Replace it with the correct architecture. Use --no-check-certificate only when its implications are understood; fixing the router CA store and clock is preferable in production.

Configure the Web UI and DNS service

  1. Open http://OpenWRTIP:3000 in a browser.
  2. Click Get Started.
  3. Select the interface and port for the Admin Web Interface.
  4. Select the interface and port for the DNS Server; do not use port 80 for the Web UI if LuCI already owns it.
  5. Create an administrator username and password.
  6. Click Next on the following page.
  7. On the congratulations page, click Open Dashboard.
  8. Log in with the account created during setup.
  9. Update the network DHCP/DNS settings so clients use the intended DNS server, then verify queries from individual clients in the query log.

Warning: Low-power routers or devices with limited flash may not be suitable for AdGuard Home. Stopping dnsmasq before preparing a replacement DNS/DHCP path can make clients lose name resolution.

Source and video


0 Bình luận

Góp Ý / Bình Luận / Đánh giá