AdGuard 0.107.78 (CT 102): DNS rewrite engine completely non-functional #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
AdGuard Home v0.107.78 on CT 102 has all 34 DNS rewrites loaded in memory (verified via
/control/rewrite/listAPI) but applies none of them at query time. Every rewrite query is forwarded to upstream withreason: NotFilteredNotFound.Evidence (all via
dig +short @127.0.0.1from CT 102 itself):Query log confirms rewrites are not being consulted:
What has been tried
systemctl restart AdGuardHome— no fixPOST /control/cache_clear— no fixPOST /control/rewrite/delete+POST /control/rewrite/add(wildcard) — no fixPOST /control/protectiontoggle off + on — no fixtest-rewrite.nuclide.lan → 192.168.1.99) — also does not matchAdGuardHome --check-config— reports okfiltering.rewritesblock has 34 entries allenabled: truestats.grafana.orgcorrectly)Likely trigger
CT 102 was OOM-killed on 2026-07-16 02:50:42 (peak 993 MiB in a 1024 MiB CT). Suspected: rewrite-engine internal state corrupted by the crash, persisted somehow, not fully rebuilt on subsequent restarts.
Downstream impact
*.nuclide.systemsgets the public IP and reaches Traefik via NAT hairpin through the D-Link routerSERVFAIL/cURL error 6: Could not resolve hostnextcloud-aio-nextcloudcontainer gets DNS SERVFAIL forid.nuclide.systemswhen hairpin blips.Immediate workaround
Add
/etc/hostsentry on affected containers (e.g. Nextcloud) mappingid.nuclide.systems → 192.168.1.8to bypass AdGuard entirely. Not scalable — every OIDC-consuming container would need this.Suggested fix
pct set 102 --memory 2048) to prevent OOM. Root cause of the state corruption./opt/AdGuardHome/data/, restart. Loses querylog + stats but should fully rebuild rewrite state.Priority
Medium — no complete outage, but a persistent latent bug that affects any OIDC flow via LAN clients and will keep biting.
Resolved 2026-07-23
Root cause was not OOM state corruption — it was a much simpler misconfiguration:
The
rewrites_enabled: falsemaster switch was disabling the entire DNS rewrite subsystem while individual rewrites remained loaded and queryable via API — which made the bug look like a rewrite-engine failure rather than a global toggle.Fix applied
pct set 102 --memory 2048(kept — CT was OOM-killed 2026-07-16 with 1024 MiB, this prevents recurrence)sed -i s/rewrites_enabled: false/rewrites_enabled: true/in/opt/AdGuardHome/AdGuardHome.yamlsystemctl restart AdGuardHomeVerified
Nextcloud → Pocket-ID discovery now hits the LAN IP directly — no more NAT hairpin, no more intermittent SERVFAIL.
A
/opt/AdGuardHome/data.bak.20260723-071835backup of the pre-wipe state is on CT 102 in case it turns out to be needed; safe to delete after a week.