Skip to content
Contents
GuidesOpenWrt

Trace DNS leaks after enabling DoH on OpenWrt

On the client, check the actual DNS assigned, then on the gateway see who it forwards to.

On the client, check the actual DNS assigned, then on the gateway see who it forwards to. DNS leakage discusses the path a query takes—abnormal return addresses might also come from caching, redirect rules, or upstream responses. First, select a test domain you can control to avoid browser cache interference.

Select an encrypted upstream and boot method

Use a proxy that supports DoH or DoT. Point dnsmasq to the proxy's local listening address and verify DNS resolution, certificate names, and system time. When the proxy fails, either report an error immediately or proceed with a clear fallback upstream. Apply the same strategy for both IPv4 and IPv6.

Trace a DNS query to the resolver used on the WAN

From a LAN client, send a fresh query for a domain you control to the resolver the client actually received. On OpenWrt, line up the proxy log, system time, and outbound connections on the WAN.

Send a new query from a client, read the proxy logs, and verify plaintext DNS and outbound connections from WAN. Have the browser's built-in DoH and the IPv6 resolver obtained via RA independently validate. Confirm local DNS resolution works normally using an internal network test domain.

Use the planned fallback if the proxy fails. If unapproved plaintext DNS still appears on the WAN, check the secondary resolver, device-specific DNS settings, and the resolvers advertised over IPv6.

Test UDP and TCP DNS from the protected client and inspect the router's outbound guard. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Check the terminal output
Test UDP and TCP DNS from the protected client and inspect the router's outbound guard. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Test UDP and TCP DNS from the protected client and inspect the router's outbound guard. · OpenWrt 25.12.6 x86/64 (QEMU/KVM). Open the original image

Reference

Related guides

Reference

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

Explore hardware

Comments