Windows 10 leaks DNS when using VPN by sending DNS to all network interfaces
See original GitHub issueDescription
See https://medium.com/@ValdikSS/beware-of-windows-10-dns-resolver-and-dns-leaks-5bc5bfb4e3f1 for more information about why the “leak” happens (it’s a Windows feature called Smart Multi-Homed Name Resolution).
Basically, Windows 10 will run multiple DNS queries (sending to multiple network interfaces) and it chooses the fastest response. Because of this behavior,
- Brave ships with DNS over HTTPS enabled (defaulted to
With your current service provider) which you can view on brave://settings/security - When changing DNS over HTTPS to use
Cloudflare (1.1.1.1), it works as expected.
Possible solutions
- We could detect if VPN is connected and enable this while connected (or make a preference for that behavior). That would only affect the browser though.
- We could expose a preference (in Brave) to toggle the registry (
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DNSClient). If toggle is enabled, we can disableSmart Multi-Homed Name Resolutionby creating a DWORD key with the nameDisableSmartNameResolutionand a value set to anything except 0. If toggle is disabled, we can remove that value
Steps to Reproduce
- Be on Windows
- Have a VPN setup through the operating system (Windows key, type
VPN settings, manually add one) - Connect to VPN
- Visit https://browserleaks.com/dns and wait for test results
Actual result:
Some DNS queries will be resolved by the ISP 🙀
Expected result:
DNS queries should ALL be resolved by the VPN
Reproduces how often:
100%
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Beware of Windows 10 DNS resolver and DNS Leaks - Medium
If you use DNS from the local network, this problem allows your ISP or a hacker with Wi-Fi ap to hijack your DNS...
Read more >DNS Resolution via VPN Not Working on Windows 10
Go to the Control Panel -> Network & Internet -> Network Connections, open the properties of your Ethernet connection, select TCP/IPv4 ...
Read more >WARNING! Windows 10 VPN Users at Big Risk of DNS Leak
This is a major issue for VPN users. It means that your ISP (and anyone listening in on your local network) will know...
Read more >Windows 10 DNS resolution via VPN connection not working
The expected behavior is to use the VPN's DNS servers, otherwise it becomes impossible to resolve DNS entries on the remote network (such...
Read more >DNS Leak Protection: How to Stop DNS Leaks Easily | VPNpro
Enforce a good DNS service: You can check out for TCP/IPv4 options within the properties of your network adapters. · Blocking the non-VPN...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Verification
PASSEDusingTest Case 1: Original issue reproduced on latest release build
1.40.113- PASSEDSteps:
1.41.91 betaNetherlands)1.40.113browserleaks.com/dnson1.40.113ipleak.netSwitzerlandbrowserleaks.com/dnsipleak.netTest Case 2: Fix verified using above steps on
1.41.91- PASSEDTest Case 3: Automatically enabling DoH with VPN via
brave://settings/security- PassedGermanybrave://settings/securityUse secure DNS * Determines how to connect to websites...is ToggledONas a defaultUse secure DNS * With Cloudflare (1.1.1.1)is chosenBraveVPNUse secure DNS * With your current service provideris checkedUse secure DNS *With your curent service providerwhile VPN is enabledTurning off secure DNS...is shownTest Case 4: Confirm Cloudflare DNS servers (via IP addresses) - PASSED
Confirm that while connected to VPN, you are using Cloudflare DNS servers, by trace-routing to their IP addresses:
Verification
PASSEDusingReproduced the original issue using
1.40.113:Original issue
BraveVPNviaaccount.brave.softwareusing latestbetabuild (leave it open and connected)releasebuild (1.40.113)releasereleasebetato any other regionreleasereleasebrowserleaks.com/dnsipleak.netConfirm default-profile pref -
PASSED1.41.91or laterbrave://settings/securityUse secure DNSis toggled toONby defaultWith your current service providerradio button is selectedIPv4 -
PASSEDaccount.brave.software(development;staginghas known issues right now) using latestbetabuild (leave it open and connected)browserleaks.com/dnsusingbetaipleak.netusingbetabetato any other regionbrowserleaks.com/dnsusingbetaipleak.netusingbetabrowserleaks.com/dnsipleak.netConfirm Cloudflare DNS servers (via IP addresses) -
PASSEDConfirm that while connected to VPN, you are using Cloudflare DNS servers, by trace-routing to their IP addresses:
brave://settings/securityUI -PASSEDbrave://settings/securityBraveVPNusingbetabrave://settings/securityUse secure DNS * With Cloudflare (1.1.1.1)is chosenBraveVPNUse secure DNS * With your current service provideris checkedbrave://settings/security defaultUse secure DNS-BraveVPNONUse secure DNS-BraveVPNOFF