VPN · 7 min read

Check If Your VPN Is Leaking DNS Requests

What a DNS leak is and why it matters

Check If Your VPN Is Leaking DNS Requests diagram

A DNS leak happens when DNS queries — the lookups your device makes to translate domain names like example.com into IP addresses — bypass your VPN tunnel and go to your ISP or another resolver outside the VPN. That can happen even while the rest of your traffic is routed through the VPN, so your IP address looks masked while your browsing fingerprint (what sites you visit) is visible to a third party.

Privacy impact: DNS activity is a readable log of the websites and services you request. If those queries go to your ISP’s DNS or a public resolver that you didn’t choose, an observer can build a timeline of visited domains even if the VPN hides your source IP.

When it often happens: DNS leaks typically stem from configuration gaps — a VPN app that doesn't override the system resolver, OS-level resolver settings, IPv6 traffic using a different path, intentionally split tunneling, or routers that intercept DNS for clients on the LAN. Misconfigured firewall rules or VPN setups can also let DNS escape the tunnel.

Do DNS requests normally go through a VPN?

With a correctly configured VPN, DNS queries should travel through the VPN tunnel and be resolved by the VPN provider’s DNS servers or by a resolver you explicitly configured inside the tunnel (for example, via DoH/DoT provided by the VPN). That keeps DNS lookups private and associated with the tunnel endpoint rather than your local network.

Exceptions are common. Split tunneling intentionally sends some traffic outside the VPN. Some apps bypass the OS resolver and talk directly to hard-coded IPs. IPv6 traffic frequently leaks when a VPN only handles IPv4. And router-level DNS (the router answering DNS for clients) can hide leaks from single-device tests.

Short takeaway: DNS lookups should go through the VPN, but OS/network quirks — especially IPv6 and resolver priority — are frequent causes of leaks.

Step-by-step: perform a reliable vpn dns leak test

Here’s a practical sequence you can follow so the test is repeatable and meaningful.

  1. Prepare the environment

    Completely connect to your VPN. Disable other network adapters you don’t need (Wi‑Fi or ethernet adapters you won’t use, tethering). Optionally reboot the device to clear transient state; a fresh start avoids leftover resolver bindings.

  2. Flush DNS caches

    Clear cached entries so the test creates fresh DNS traffic. Commands:

    • Windows: ipconfig /flushdns
    • macOS: sudo dscacheutil -flushcache and sudo killall -HUP mDNSResponder (some macOS versions only need one)
    • Linux (systemd): sudo resolvectl flush-caches or sudo systemd-resolve --flush-caches

    Also restart your browser or use a private/incognito window to avoid cached DNS inside the browser.

  3. Run multiple vpn dns leak test tools

    Use at least two services and compare results. Recommended pages: DNSLeakTest.com, IPLeak.net (ipleak), and BrowserLeaks (for WebRTC checks). Run a quick and an extended test where available; extended tests enumerate more resolvers.

  4. Interpret results

    Look for the resolver IPs and names that the tools report. If they show your VPN provider or the resolver you expect (e.g., Cloudflare/1.1.1.1 or your VPN’s DNS), DNS is probably inside the tunnel. If they show your ISP or a local ISP-owned hostname, you have a DNS leak.

  5. Repeat

    Run the tests from a second browser or device on the same network (to isolate router issues). Run them after a few minutes of browsing, and while connecting to different servers in your VPN provider’s list. Intermittent leaks appear only under some conditions, and a single pass isn’t definitive.

Why some leak tests can be misleading (and how to avoid false negatives)

Leak tests can give false confidence unless you control timing and caching.

Timing issues: tests make fresh lookups, which usually go through the VPN. Intermittent configuration issues or app-specific queries can leak later. Run tests multiple times, after browsing, and after network state changes.

Cached/resolved entries: browser or OS caches can hide leaks that occurred previously. Always flush caches before testing and use private windows to minimize warm caches.

Repeat and vary: test from different browsers and device types. Run a WebRTC check because WebRTC can reveal local IPs independent of DNS. A combination of tests increases your chance of catching atypical leaks.

Immediate fixes to stop DNS leaks

Some fixes are quick; others require admin access. Try these in order:

Platform-specific checks and remedies

Different OSes manage DNS differently. These checks target the most common causes.

Windows

Check adapter metrics and network priority so the VPN interface wins. In the Control Panel > Network Connections, ensure the VPN entry is listed above other networks in the binding order where applicable. Disable “Smart Multi‑Homed Name Resolution” if your domain name service falls back to other interfaces — this setting is in Group Policy (Computer Configuration → Administrative Templates → Network → DNS Client → Turn off Smart Multi‑Homed Name Resolution).

If DNS still leaks, create outbound firewall rules blocking udp/tcp:53 on the non‑VPN adapters, or use the PowerShell and netsh advanced firewall UI to restrict DNS to the VPN interface only.

macOS

Inspect System Preferences → Network → Service Order: the VPN service should be above others when connected. Check per-service DNS settings; some macOS versions attach DNS to the service rather than a global resolver list. Use networksetup to inspect and set DNS per service: networksetup -getdnsservers "Wi‑Fi", networksetup -setdnsservers "Wi‑Fi" 1.1.1.1.

Linux

Check /etc/resolv.conf and systemd-resolved behavior (resolvectl status). If your distribution uses NetworkManager, confirm the VPN profile pushes DNS or set a DNS entry via the connection editor. If split tunneling is used, add iptables/nftables rules to block DNS on non‑VPN devices.

Android / iOS

Use the VPN app’s DNS leak protection. Prefer apps that install a system‑wide tunnel or use the platform’s VPN APIs correctly. On Android, legacy implementations can leave gaps with “Always‑on VPN” — modern Android supports per‑app VPNs and system tunnels; test both. On iOS, verify the profile installs a system tunnel (IKEv2/NEPacketTunnel) rather than only per‑app routing.

Routers

If the router answers DNS for clients, it can hide leaks from a single device test or create router‑level leaks. Either point the router to a private resolver (over DoT/DoH) or configure the router to route client traffic through the VPN so DNS resolves inside the tunnel. On many consumer routers you’ll need a custom firmware or a router that supports VPN client mode for this to work cleanly.

Recommended tools and how to re-test consistently

Use at least two different online tests for certainty. Good choices are DNSLeakTest.com, IPLeak.net, BrowserLeaks (run the WebRTC and DNS tests), and Cloudflare’s resolver checks. When you run a vpn dns leak test, do so immediately after flushing caches and after browsing for a while.

Automate repeat checks where you can: run tests after reconnecting the VPN, after changing servers, or after network changes. Test from a second device on the same network to see if the router is the source. If results are inconsistent, apply firewall rules that force DNS to the tunnel and then retest.

When to call it fixed: consistent results across multiple tools and devices showing your VPN provider’s DNS or the specific resolver you expect means the leak is resolved. If you still see your ISP or local resolver reported, apply stricter firewall rules or contact support. VPN4All apps include DNS leak protection and a kill switch — if the app settings don’t stop a leak, submit the test output to support for analysis.

Running a vpn dns leak test and following these steps will help you identify where DNS traffic is going and give you practical fixes so your DNS stays private while you’re connected.

Ready to try it?

Get VPN4All →