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 Resolution
by creating a DWORD key with the nameDisableSmartNameResolution
and 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 FreeTop 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
Top GitHub Comments
Verification
PASSED
usingTest Case 1: Original issue reproduced on latest release build
1.40.113
- PASSEDSteps:
1.41.91 beta
Netherlands
)1.40.113
browserleaks.com/dns
on1.40.113
ipleak.net
Switzerland
browserleaks.com/dns
ipleak.net
Test Case 2: Fix verified using above steps on
1.41.91
- PASSEDTest Case 3: Automatically enabling DoH with VPN via
brave://settings/security
- PassedGermany
brave://settings/security
Use secure DNS * Determines how to connect to websites...
is ToggledON
as a defaultUse secure DNS * With Cloudflare (1.1.1.1)
is chosenBraveVPN
Use secure DNS * With your current service provider
is checkedUse secure DNS *With your curent service provider
while 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
PASSED
usingReproduced the original issue using
1.40.113
:Original issue
BraveVPN
viaaccount.brave.software
using latestbeta
build (leave it open and connected)release
build (1.40.113
)release
release
beta
to any other regionrelease
release
browserleaks.com/dns
ipleak.net
Confirm default-profile pref -
PASSED
1.41.91
or laterbrave://settings/security
Use secure DNS
is toggled toON
by defaultWith your current service provider
radio button is selectedIPv4 -
PASSED
account.brave.software
(development
;staging
has known issues right now) using latestbeta
build (leave it open and connected)browserleaks.com/dns
usingbeta
ipleak.net
usingbeta
beta
to any other regionbrowserleaks.com/dns
usingbeta
ipleak.net
usingbeta
browserleaks.com/dns
ipleak.net
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:
brave://settings/security
UI -PASSED
brave://settings/security
BraveVPN
usingbeta
brave://settings/security
Use secure DNS * With Cloudflare (1.1.1.1)
is chosenBraveVPN
Use secure DNS * With your current service provider
is checkedbrave://settings/security default
Use secure DNS
-BraveVPN
ON
Use secure DNS
-BraveVPN
OFF