Research publication Leak testing
How DNS leaks happen in VPN clients: a technical taxonomy
A DNS leak occurs when name-resolution traffic leaves a device outside the VPN tunnel, or reaches a resolver the VPN did not designate, while the tunnel is meant to be active. We classify leaks into seven mechanisms (DL-1 to DL-7) and give a test that records path and resolver.
Abstract
Most DNS-leak checks answer a single question — which resolver received a test query? — and therefore conflate causes that need different fixes. This publication proposes a taxonomy of seven leak classes grouped by the mechanism that produces them: resolver selection in the operating system’s stub resolver, split DNS and per-application split tunnelling, IPv6 resolvers on IPv4-only tunnels, application-level encrypted resolvers, transition windows around tunnel state changes, captive-portal exceptions, and link-local multicast name resolution. For each class we describe the mechanism with reference to documented platform behaviour and the relevant IETF specifications, the conditions that trigger it and the point at which it can be observed. We close with a test procedure that combines packet capture on the physical interface with uniquely labelled queries to an authoritative name server under the tester’s control, so that the path and the resolver of every leaked query are recorded as evidence.
Definition and scope
For the purposes of this publication, a DNS leak is any name-resolution query that, while a VPN tunnel is supposed to carry the device’s traffic, either leaves the device by a path other than the tunnel or is answered by a resolver other than the one the VPN configuration designates.
The definition is deliberately broader than “a query to the internet provider’s resolver”: it includes queries that reach a third-party resolver through the tunnel, and multicast queries on the local network. It covers DNS as specified in RFC 1034 and RFC 1035 [1, 2], its encrypted transports — DNS over TLS [3], DNS over HTTPS [4] and DNS over QUIC [5] — and link-local resolution. Terminology follows RFC 9499 [6]: the stub resolver on the device forwards questions; a recursive resolver resolves them on its behalf.
DNS matters because queries name the services a user is about to contact, and plaintext DNS is readable by every network on the path [7]. A VPN that tunnels application traffic but not name resolution leaves much of the browsing record visible to the local network and the access provider.
Two dimensions: path and resolver
Most online leak checks show which resolvers queried their authoritative server for a few unique names. That answers which resolver, not which path the query took from the device. The two are independent:
- Path leak, intended resolver. The query reaches the VPN provider’s resolver over the physical interface — for example because a route to the resolver’s public address was installed outside the tunnel. The local network sees it in plaintext; a resolver-only check reports nothing.
- Intended path, other resolver. The query travels inside the tunnel to a resolver chosen by an application. Nothing is visible locally, but a third party holds the query log.
- Path leak, other resolver. The familiar case: the query leaves through the physical interface to the access network’s resolver.
We therefore record every query against both dimensions. Figure 1 maps the routes a lookup can take to the classes defined below.
The taxonomy
The seven classes are defined by mechanism, because the mechanism determines both the fix and the test. One client can exhibit several at once.
| Class | Mechanism | Typical trigger | Where to observe |
|---|---|---|---|
| DL-1 | Stub resolver sends queries to resolvers on non-tunnel interfaces | Connect; interface order or metric changes | Physical-interface capture; authoritative logs |
| DL-2 | Domain- or application-based exceptions route queries outside the tunnel | Split DNS rules; per-app split tunnelling | Capture, attributed by distinct test names |
| DL-3 | IPv6 resolvers from Router Advertisements or DHCPv6 stay reachable natively | Dual-stack network, IPv4-only tunnel | IPv6 capture on the physical interface |
| DL-4 | Application or operating system uses its own encrypted resolver | Browser DoH, Android Private DNS, DDR/DNR upgrade | Authoritative logs; known endpoints and TLS SNI |
| DL-5 | Queries sent while the tunnel is down or being rebuilt | Reconnect, sleep/wake, network change, start-up | Time-aligned capture during forced events |
| DL-6 | Captive-portal exceptions that are too broad or too long-lived | Hotel, airport and café networks | Captive-portal lab network |
| DL-7 | mDNS, LLMNR or NetBIOS queries on the local link | Single-label or .local names | Multicast capture on the physical interface |
DL-1 — Resolver selection in the operating system
Operating systems associate resolver addresses with interfaces and decide, per query, which to use. A connecting VPN adds its resolver to the tunnel interface, but the physical interface usually keeps its own; what happens next depends on platform-specific selection logic [8, 9].
Windows orders interfaces by metric, and since Windows 8 the DNS Client can query the resolvers of several interfaces in parallel and use the first answer — behaviour controlled by the “Turn off smart multi-homed name resolution” policy. A client that adds its own resolver without suppressing the others, through Name Resolution Policy Table rules or filters on port 53, can leak even while its resolver is first in the order. Behaviour differs between Windows releases, so tests must record the exact build.
Linux with systemd-resolved keeps per-link resolvers and routing domains. A query that matches no routing domain goes to the servers of every link configured as a DNS default route [10]. Unless the VPN link claims the catch-all routing domain ~. and other links lose default-route status, queries go to both. Clients that overwrite /etc/resolv.conf instead are undone by any network manager that rewrites the file.
Apple platforms keep scoped and supplemental resolver configurations: Network Extension DNS settings without match domains become the default resolver, while settings with match domains apply only to those suffixes. On Android, resolution is per network, and apps whose default network is the VPN use the DNS servers the VPN app supplied.
DL-2 — Split DNS and split tunnelling
Split DNS deliberately sends some names to one resolver and the rest to another, typically an internal suffix to an internal resolver. Match domains that are too broad send public names to the wrong resolver; rules that are too narrow let internal host names fall through to a public one.
Per-application split tunnelling adds a subtler problem. The tunnel-or-bypass decision is made per process, but DNS is usually resolved by a shared system service — the DNS Client on Windows, mDNSResponder on Apple platforms, systemd-resolved on many Linux systems — so the query carries the identity of that service, not of the application that triggered it. Depending on the implementation, an excluded application’s lookups travel through the tunnel, or an included application’s lookups travel outside it. Tests must exercise both, using distinct test names per application.
DL-3 — IPv6 resolvers on an IPv4-only tunnel
On dual-stack networks a device learns IPv6 resolvers from Router Advertisements carrying the RDNSS option [11], or from DHCPv6. A tunnel that carries only IPv4 leaves the native IPv6 default route in place, so queries to these resolvers travel outside it — systematically, not occasionally. The companion publication IPv6 and WebRTC: the overlooked leak paths (VPNL-R-2026-005) treats this path, and the wider IPv6 leak it belongs to, in depth.
DL-4 — Application-level encrypted resolvers
Encryption changes who can read a query, not which resolver receives it. A browser with built-in DNS over HTTPS sends queries to its own configured resolver, bypassing the operating system’s and therefore the VPN’s. With a full tunnel the DoH connection stays inside it, so the local network sees nothing — but the DoH operator sees every name. That is a resolver divergence a test must report, whatever the threat model.
Browsers avoid overriding managed networks in different ways. Firefox does not enable DoH by default if the network’s resolver returns a negative answer for the canary domain use-application-dns.net, though an explicit user setting still applies [12]. Chromium-based browsers in their default mode upgrade only when the system resolver belongs to a provider with a known DoH service.
At operating-system level, Android’s Private DNS (since Android 9) sends DNS over TLS to port 853, opportunistically to the network’s resolver or to a user-specified hostname; RFC 8310 defines these opportunistic and strict profiles [13]. Networks can also advertise encrypted resolvers through Discovery of Designated Resolvers [14] and the DNR options [15]; a client that honours them on the physical interface while connected may upgrade to a resolver chosen by the local network.
DL-5 — Transition windows
Many leaks are transient. Every change in tunnel state rewrites routes, resolver configuration and filter rules; between removal of the old configuration and activation of the new one, the operating system falls back to the physical interface’s resolver. Typical triggers:
- reconnects after loss of the server, key renegotiation failures or a change of server;
- sleep and wake, where the network stack resumes before the VPN process does;
- network changes such as Wi-Fi roaming or switching between Wi-Fi and Ethernet;
- start-up, when applications run before the VPN service has connected;
- client updates, and crashes of a privileged helper process.
Whether queries escape depends mainly on the kill switch design, analysed in Kill switches compared: firewall-based vs route-based enforcement (VPNL-R-2026-003). Applications retry failed lookups quickly, so a window of a few hundred milliseconds can let several queries out. Tests must force transitions repeatedly while generating continuous lookups.
DL-6 — Captive-portal exceptions
Captive portals intercept traffic until the user signs in; RFC 8910 lets networks announce them through DHCP and Router Advertisements [16], within the architecture of RFC 8952 [17]. A client with a strict kill switch must allow the portal’s name resolution and web traffic outside the tunnel. Leaks occur when that exception is broader than the portal, lasts longer than the sign-in, or is usable by other applications.
DL-7 — Link-local multicast name resolution
Multicast DNS [18], Link-Local Multicast Name Resolution [19] and the legacy NetBIOS name service ask every host on the local link and never traverse the tunnel. Operating systems fall back to them for single-label and .local names, so a mistyped internal host name can be multicast to an untrusted café network. Strictly a disclosure rather than a tunnel leak, it belongs in the same test because the observation point is the same.
How to test for DNS leaks
A DNS-leak test should produce, for every query triggered during the test, a record of its path and its resolver. We use two observation points at the same time.
- Packet capture on the physical interface. Everything that leaves the device outside the tunnel appears here. A capture filter on the relevant ports catches plaintext DNS, DoT and DNS over QUIC, and link-local resolution. DoH is indistinguishable from other HTTPS by port, so captures are also matched against a list of known DoH endpoints and, where visible, the TLS Server Name Indication.
- An authoritative name server under the tester’s control. Each test query uses a unique label — a run identifier and sequence number under a dedicated test zone. The authoritative server logs the source address of the recursive resolver that asked for each label. Because every label is unique, the log shows which resolver handled each individual query, independently of what the client reports.
# Physical interface (example: en0); excludes the VPN server's own tunnel traffic.
tcpdump -n -i en0 -w run-017.pcap \
'(port 53 or port 853 or port 5353 or port 5355 or port 137) and not host 203.0.113.10'
Each transition is run repeatedly. Per run we record the queries observed outside the tunnel, the time of the first and last relative to the trigger, and the resolver that answered each label. Captures are hashed at collection and published where they contain no personal data, as described in our leak-testing methodology and evidence-handling procedure.
Reporting a DNS leak
We report each leak with its class code, trigger, count and window. An illustrative example, describing no product: “DL-5, reconnect after server loss: three plaintext queries on the physical interface within 1.5 seconds of the tunnel going down, in 4 of 20 runs; resolver: access network.” The code tells the vendor where to look: DL-1 at resolver configuration, DL-5 at the kill switch, DL-4 at application settings the client may not control.
Severity depends on context and is rated with our severity methodology, not per class.
Limitations
The taxonomy describes mechanisms, not products. Platform behaviour changes between releases, so every test must record the exact operating-system build and client version. Encrypted resolvers hide some queries from packet capture, making the authoritative-server log the primary evidence for DL-4. And the absence of leaks in a finite number of runs is evidence about those runs, not proof that no leak can occur.
References
All sources are publicly available primary documents. Numbers correspond to the bracketed citations in the text.
- 1Mockapetris, P. (1987). Domain Names — Concepts and Facilities (RFC 1034). RFC Editor. https://www.rfc-editor.org/rfc/rfc1034
- 2Mockapetris, P. (1987). Domain Names — Implementation and Specification (RFC 1035). RFC Editor. https://www.rfc-editor.org/rfc/rfc1035
- 3Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., & Hoffman, P. (2016). Specification for DNS over Transport Layer Security (TLS) (RFC 7858). RFC Editor. https://www.rfc-editor.org/rfc/rfc7858
- 4Hoffman, P., & McManus, P. (2018). DNS Queries over HTTPS (DoH) (RFC 8484). RFC Editor. https://www.rfc-editor.org/rfc/rfc8484
- 5Huitema, C., Dickinson, S., & Mankin, A. (2022). DNS over Dedicated QUIC Connections (RFC 9250). RFC Editor. https://www.rfc-editor.org/rfc/rfc9250
- 6Hoffman, P., & Fujiwara, K. (2024). DNS Terminology (RFC 9499). RFC Editor. https://www.rfc-editor.org/rfc/rfc9499
- 7Wicinski, T. (Ed.). (2021). DNS Privacy Considerations (RFC 9076). RFC Editor. https://www.rfc-editor.org/rfc/rfc9076
- 8Savolainen, T., Kato, J., & Lemon, T. (2012). Improved Recursive DNS Server Selection for Multi-Interfaced Nodes (RFC 6731). RFC Editor. https://www.rfc-editor.org/rfc/rfc6731
- 9Anipko, D. (Ed.). (2015). Multiple Provisioning Domain Architecture (RFC 7556). RFC Editor. https://www.rfc-editor.org/rfc/rfc7556
- 10The systemd project. (n.d.). systemd-resolved.service(8) — manual page. freedesktop.org. https://www.freedesktop.org/software/systemd/man/latest/systemd-resolved.service.html
- 11Jeong, J., Park, S., Beloeil, L., & Madanapalli, S. (2017). IPv6 Router Advertisement Options for DNS Configuration (RFC 8106). RFC Editor. https://www.rfc-editor.org/rfc/rfc8106
- 12Mozilla. (n.d.). Canary domain — use-application-dns.net. Mozilla Support. https://support.mozilla.org/en-US/kb/canary-domain-use-application-dnsnet
- 13Dickinson, S., Gillmor, D., & Reddy, T. (2018). Usage Profiles for DNS over TLS and DNS over DTLS (RFC 8310). RFC Editor. https://www.rfc-editor.org/rfc/rfc8310
- 14Pauly, T., Kinnear, E., Wood, C. A., McManus, P., & Jensen, T. (2023). Discovery of Designated Resolvers (RFC 9462). RFC Editor. https://www.rfc-editor.org/rfc/rfc9462
- 15Boucadair, M. (Ed.), Reddy.K, T. (Ed.), Wing, D., Cook, N., & Jensen, T. (2023). DHCP and Router Advertisement Options for the Discovery of Network-designated Resolvers (DNR) (RFC 9463). RFC Editor. https://www.rfc-editor.org/rfc/rfc9463
- 16Kumari, W., & Kline, E. (2020). Captive-Portal Identification in DHCP and Router Advertisements (RAs) (RFC 8910). RFC Editor. https://www.rfc-editor.org/rfc/rfc8910
- 17Larose, K., Dolson, D., & Liu, H. (2020). Captive Portal Architecture (RFC 8952). RFC Editor. https://www.rfc-editor.org/rfc/rfc8952
- 18Cheshire, S., & Krochmal, M. (2013). Multicast DNS (RFC 6762). RFC Editor. https://www.rfc-editor.org/rfc/rfc6762
- 19Aboba, B., Thaler, D., & Esibov, L. (2007). Link-Local Multicast Name Resolution (LLMNR) (RFC 4795). RFC Editor. https://www.rfc-editor.org/rfc/rfc4795
Cite this publication
APA style
VPN Network Research Labs. (2026, June 16). How DNS leaks happen in VPN clients: A technical taxonomy (Research Publication No. VPNL-R-2026-001, Version 1.1). https://vpn.com.de/research/dns-leaks-in-vpn-clients
BibTeX
@techreport{vpnl-r-2026-001,
author = {{VPN Network Research Labs}},
title = {{How DNS leaks happen in VPN clients: a technical taxonomy}},
institution = {VPN Network Research Labs},
type = {Research Publication},
number = {VPNL-R-2026-001},
year = {2026},
month = jun,
date = {2026-06-16},
version = {1.1},
url = {https://vpn.com.de/research/dns-leaks-in-vpn-clients},
langid = {en},
note = {Version 1.1, updated 2026-10-14}
}
Download citation
Cite the document ID and the version you read. Document IDs are permanent; substantive changes receive a new version number and an entry in the revision history below.
Revision history
| Version | Date | Change |
|---|---|---|
| 1.1 | Added encrypted-resolver discovery (DDR, RFC 9462; DNR, RFC 9463) to class DL-4 and clarified resolver selection with systemd-resolved under DL-1. | |
| 1.0 | Initial publication. |
Found an error? Write to support@vpn.com.de. Corrections are handled under our corrections and retractions policy and are never applied silently.
Methodology and definitions
Terms used in this publication
Test records
This publication contains no results about specific products. Product tests, audits and their evidence are published in the Report Registry and the Evidence Database.