The short answer
A VPN leaks DNS when some of your lookups reach a resolver by a path the VPN doesn't control. There are only a handful of ways that happens. The VPN doesn't carry IPv6, the app is excluded from the tunnel, the operating system asks more than one network, the browser has its own DNS setting, the tunnel wasn't up yet, or a DNS server set by hand wins over the VPN's.
Each of those leaves a trace you can see with a standard command. This guide goes through them one by one. Fix the one you find, run the test again, and only then move to the next.
First, write down what you have
Connect the VPN, then save the output of these commands. You'll compare against them after every change.
- Windows. ipconfig /all lists every network adapter with its DNS servers. In PowerShell, Get-DnsClientServerAddress gives the same DNS addresses per interface in a shorter table, IPv4 and IPv6 apart.
- macOS. scutil --dns prints each resolver configuration the system holds, with its nameservers and the interface it belongs to.
- Linux with systemd-resolved. resolvectl status shows the DNS servers for each link, including the VPN's.
- Any of them. nslookup example.com prints the server it asked before the answer.
On Windows, Resolve-DnsName example.com does a lookup through the system's resolver, and its -Server option sends the question to a server you name instead. That helps when you want to check whether one particular resolver is reachable through the tunnel.
These commands describe the operating system. Our test describes the browser. When they disagree, the difference is your first clue, usually pointing to the browser setting covered below.
IPv6 that the VPN doesn't carry
What happens. Your connection has both IPv4 and IPv6, and the VPN only builds a tunnel for IPv4. Your device can still reach an IPv6 resolver directly, often your provider's, and use it for some lookups.
How to see it. Look for IPv6 addresses among the DNS servers in your saved output. Addresses with colons, such as 2001:db8::53, on the Wi-Fi or Ethernet adapter rather than the VPN adapter are the sign. In the test, this often looks like a few lookups going to your provider while most go to the VPN.
What to look for in the VPN. An option for IPv6 support or IPv6 leak protection, and what its help pages say about IPv6. If the VPN has no answer, the home page's fix steps describe the workaround and how to undo it.
Split tunnelling
What happens. Split tunnelling sends some apps or some destinations through the VPN and leaves the rest on your normal connection. If the browser is outside the tunnel, so are its lookups. Some VPNs also send DNS for excluded apps to the normal resolver on purpose.
How to see it. The connection panel at the top of the test is the quickest check. If it shows your home provider as the network owner, the browser isn't using the tunnel at all. If the IP is the VPN's but some lookups go to your provider, DNS is being treated differently from the rest of the traffic.
What to look for in the VPN. The list of excluded or included apps, any list of excluded websites or IP ranges, and what the help pages say happens to DNS for excluded apps.
Windows asking every network
What happens. Windows has a feature called smart multi-homed name resolution. Microsoft describes it as issuing DNS, LLMNR and NetBIOS queries in parallel across all networks, to get an answer faster. If your Wi-Fi adapter still has your provider's DNS server while the VPN adapter has the VPN's, both can receive the same question.
How to see it. In Get-DnsClientServerAddress, both adapters list DNS servers while the VPN is connected. In the Extended test, both networks show up, often with a similar number of lookups.
What to look for in the VPN. A DNS leak protection option. Some VPN apps block DNS to other adapters while connected, which deals with this directly. Microsoft documents a Group Policy setting called "Turn off smart multi-homed name resolution". On a work computer it is your administrator's decision. This is one mechanism among several, not a cure for every leak, and it is not a reason to edit the registry.
The browser's own secure DNS
What happens. Browsers can send lookups over HTTPS to a resolver of their choosing, without asking the operating system. Chrome's help says secure DNS is on by default in automatic mode, and that it falls back to unencrypted DNS if lookups fail in that mode. With a custom provider selected, Chrome won't fall back. Firefox calls its version Trusted Recursive Resolver, or TRR. Mozilla's notes on its settings say that on Windows, TRR is turned off when Firefox detects a VPN, unless that is changed.
How to see it. The test shows a public resolver such as Cloudflare or Google while nslookup example.com shows the VPN's server. The lookups went to a resolver chosen by the browser. Where the HTTPS connection to that resolver traveled is a separate question, and on a full tunnel it normally goes through the VPN.
What to look for. The secure DNS setting in the browser, and whether it names a provider. Set it back to the default or to automatic while the VPN is on if you want the VPN's resolver to answer. The browser's own help page has the current location of the setting.
Hotel Wi-Fi and reconnects
What happens. A captive portal is the sign-in page on hotel, airport and café Wi-Fi. RFC 8952 describes it as a network that limits devices to a few hosts until the user meets its conditions. The VPN can't connect until you've signed in, so anything that looks up a name in the meantime uses the hotel's resolver. The same gap opens for a moment when the laptop wakes from sleep or switches networks and the VPN reconnects.
How to see it. Run the test right after the VPN reports it is connected, then again a minute later. A leak only in the first run points to this gap. ipconfig /all or scutil --dns taken during the reconnect will show the hotel's DNS server.
What to look for in the VPN. A kill switch, and whether its help pages say it blocks DNS while the tunnel is down or reconnecting, not just other traffic. Some apps also have an option to connect automatically on untrusted Wi-Fi.
A VPN that brings no resolver
What happens. Some VPN setups, often hand-built ones or simple router configurations, create the tunnel but don't hand your device a DNS server. Your device keeps using the one it already had, which is usually your provider's. If the tunnel carries all traffic, those lookups travel through it to your provider's resolver and come out on the far side. RFC 9076 notes the recursive resolver sees all of a client's queries, so your provider still sees every name.
How to see it. Compare the DNS servers before and after connecting. If nothing changes, the VPN didn't supply any. In the test, the provider's resolver shows as "Different network" because your IP is now the VPN's.
What to look for. A DNS server option in the VPN's configuration or its published DNS addresses. If you set one by hand, make sure it is an address the VPN documents as reachable inside the tunnel.
DNS set by hand
What happens. A DNS server typed into the network adapter, or into the router, stays in place when the VPN connects. Depending on the VPN and the operating system, it may be used alongside the VPN's resolver or instead of it. A router set to a public resolver adds another layer, because the router forwards your questions to whoever it is set to.
How to see it. The saved output shows fixed DNS addresses on the normal adapter. If nslookup example.com names your router, such as 192.0.2.1, log in to the router and check which upstream servers it uses.
What to look for. Note down the manual addresses, set the adapter back to automatic, and test again. If you want a particular resolver, set it inside the VPN app if it allows custom DNS, so the VPN sends it through the tunnel.
Worked example: two adapters on Windows
A Windows laptop on home Wi-Fi connects to a VPN. Get-DnsClientServerAddress shows two adapters with DNS servers.
| Interface | IPv4 DNS server |
|---|---|
| Wi-Fi | 198.51.100.53 |
| VPN adapter | 203.0.113.53 |
The public IP in the test is 203.0.113.45 on Example VPN Network (AS64501). The Extended test answers all 36 lookups.
| Resolver IP | Owner | Tag | Lookups |
|---|---|---|---|
| 203.0.113.53 | Example VPN Network (AS64501) | Same network as your IP | 36 |
| 198.51.100.60 | Example Internet Provider (AS64500) | Different network | 29 |
The verdict is “Possible leak”. Nearly every name went to both networks, which is what parallel queries look like. A one-off fallback would show a handful of lookups, not 29. The provider's row shows 198.51.100.60 rather than the .53 address on the adapter, because the provider's resolver sends its questions out from another address in its own network.
The browser's secure DNS was off, so that cause is ruled out. Next, the VPN's DNS leak protection option turned out to be off. After turning it on and reconnecting, the Extended test showed one row, 203.0.113.53 with 36 lookups, and "Looks fine". A second run after the laptop woke from sleep gave the same result.
Had leak protection already been on, the next things to check would be split tunnelling and the router.
Sources
- Microsoft Learn: DNS client policies (Turn off smart multi-homed name resolution)
- Microsoft Learn: Get-DnsClientServerAddress
- Microsoft Learn: Resolve-DnsName
- Google Chrome Help: Use secure DNS
- Mozilla Wiki: Trusted Recursive Resolver settings
- RFC 8952: Captive portal architecture
- RFC 9076: DNS privacy considerations