There are 3 native network-wide adblocking projects tailored specifically to OpenWrt: adblock, adblock-lean and adblock-fast. Either of them will be much easier to set up than AGH, with adblock-lean being probably the easiest (saying this as the current maintainer of adblock-lean) and most resource-efficient.
Oh my goodness. Are you telling me that I can just add one of these from the luci gui package manager and it will work out of the gate?
Yes, excuse me I thought I had replied to him.
Yes, with the exclusion of adblock-lean which for now doesn't have an installable package.
(adblock-lean is still very easy to install, following the README).
Edit: as to working out of the gate, I do not know about adblock and adblock-fast as I haven't used these projects. adblock-lean, for this matter, includes an interactive setup wizard which automatically selects a preset based on your device's specs, so you basically just need to enter 'y' a couple times in the console and you have adblocking on your device.
okay, I will give lean a try when I have an opportunity.
Thanks so much.
If you're struggling with AdGuardHome on OpenWrt, this might save you a few resets.
It auto-generates the config, handles the dnsmasq integration, and fixes the router self-DNS issue (0.0.0.0 instead of 192.168.1.1) that breaks connectivity after install.
Just sharing in case it helps.
Wait, I'm confused, don't you change the router ip before installing so there is no conflict?
Thanks for posting. This gives me a few options to explore.
The issue isn't a conflict with the router IP — it's about which address AdGuard Home binds to.
If you bind to 192.168.1.1 (the LAN IP), the router itself can't resolve DNS through AdGuard Home, because it tries to reach itself via that address before the service is fully up. Binding to 0.0.0.0 makes it listen on all interfaces, so the router's own DNS queries work correctly too.
Changing the router IP doesn't fix this — the same problem occurs regardless of what the LAN IP is.
If you want to skip all of this, the script handles it automatically. Just run this on your router:
mkdir -p /tmp && wget --no-check-certificate -O /tmp/adguardhome.sh "https://site-u.pages.dev/www/custom-scripts/adguardhome.sh" && chmod +x /tmp/adguardhome.sh && sh /tmp/adguardhome.sh
If you'd like to review before running:
this is the same thing you were told two days ago, default AGH config breaks name resolution for the router itself.
What? How? The one in the packages feed?
AGH is set to listen to LAN IP/interface, router itself is set to use localhost.
You have to go through the initial setup before it even starts where you're asked to define the DNS port and pick interfaces:
It doesn't allow you to set a port that's already in use:
I just went through the initial setup in QEMU, set a port to a free one, and DNS on the router is still working. So what exactly is broken?
No trying to pick an argument, but asking in the context of being the package maintainer.
¯_(ツ)_/¯
There are at least 25 threads about this (non?) "problem".
People either don't follow the wizard/guide or there's a separate issue, I don't know, I'm using Pi-hole myself.

