Skip to content
Contents
GuidesOpenWrt

AdGuard Home on OpenWrt: keep local names working when you change DNS

Choose which resolver owns port 53 on the LAN. Test a local hostname and a public name before advertising the new resolver to other clients.

Choose which resolver owns port 53 on the LAN. Test a local hostname and a public name before advertising the new resolver to other clients.

Choose a listener and a resolver for the local domain

If dnsmasq stays on port 53, give AdGuard Home a different listening port and forward external queries to its actual address and port. Keep local names with dnsmasq. If AdGuard Home takes TCP and UDP 53, first move the dnsmasq DNS listener to a free local port. Forward only the local domain back to that listener. Avoid forwarding the same name back and forth. Keep the existing DHCP service during this test.

Why does the query log show 127.0.0.1 as the client?

From a wired client, ask the gateway for a fresh name you control and note the time and record type. In Query log, search by name before looking at Client. Both A queries in the screenshot came from a local test client at 127.0.0.1. When dnsmasq forwards over loopback, several devices can appear under that one forwarder address. The field alone cannot identify which phone opened a page.

AdGuard Home · Query log · 127.0.0.1

Compare Request, Status and Reason at the same time. In the lab, a custom rule blocked viewing.sample.test while playback.sample.test was processed normally. Use your own blocked and allowed names at home. If neither appears, check that logging is on, then check the client's DNS settings, cache, browser DNS and which gateway process owns TCP and UDP port 53. If LAN queries work but the internal NAS name fails, restore the previous local-domain forwarding and retry from the same client.

Test from one LAN client before changing DHCP

Record the previous DNS setting, the NAS name and one public domain. Point one test client at the gateway, resolve both names, then open a usual service. If only the internal name fails, check the suffix and the local resolver's port. If both fail, check listener ownership and the upstream destination. Restore the original listener and DNS advertisement if you lose service. Only roll out to other clients after both tests pass. Smart plug offline after DNS filtering? Allow one hostname for one client

Reference

Reference

Check the model, region and hardware revision on the label before selecting firmware.

Explore hardware

Comments