How to fix a DNS leak
After a leak test shows an unexpected resolver, the fix is to send DNS only through the VPN or through a resolver you chose. The steps differ for browsers, operating systems, and VPN protocols.
Use this checklist after a standard or extended leak test. Re-run the test after each change instead of stacking several untested settings.
These instructions stay on your device. The linked leak test still runs in the browser against public endpoints.
How to use this tool
- Disable the browser’s automatic secure DNS while you diagnose.
- Reconnect the VPN and flush the local DNS cache.
- Run the leak test again and confirm resolvers match the VPN.
Re-test for DNS leaks
Browsers
Chrome, Brave, Edge, Opera: Settings → Privacy and security → Security → turn off Use secure DNS.
Firefox: Settings → Privacy & Security → Enable DNS over HTTPS → Off.
If the operating system or VPN client already manages DNS, a browser override is a common source of unexpected resolvers.
Windows
Connect the VPN, then flush the cache with ipconfig /flushdns.
In the active adapter’s IPv4 properties, avoid leftover static ISP DNS servers while the tunnel is up. After disconnecting, restore automatic DNS if that was your previous setup.
For IPv6 leaks, check that the adapter is not still pointing at an ISP IPv6 resolver.
macOS and Linux
On macOS, confirm the VPN service is the active DNS source in network settings after connect.
On Linux, check /etc/resolv.conf after the VPN comes up. Extra nameserver lines that still point at the ISP are a leak. Some distributions keep systemd-resolved in control; the VPN client must replace those resolvers, not just add its own.
OpenVPN and WireGuard
OpenVPN 2.3.9 and later can use block-outside-dns on Windows to stop lookups leaving the tunnel.
WireGuard configs should set DNS under [Interface] to the resolver the VPN provides. An empty DNS line leaves the previous system resolver in place.
Frequently asked questions
Should I disable IPv6?
Only if your VPN does not cover IPv6 and leak tests keep showing an ISP IPv6 resolver. Prefer a VPN that handles both families.
Do I need to change DNS after I disconnect?
Yes if you added a dummy or VPN-only resolver on the physical adapter. Restore automatic DNS so ordinary browsing works offline from the VPN.
Related tools