How to test a VPN or proxy for leaks

Five checks in ten minutes: a baseline, exits, DNS, WebRTC and what happens when the tunnel drops. What each result proves, and what it doesn’t.

Popo
On this page

A VPN showing "connected" tells you that a tunnel exists. It doesn't tell you that everything goes through it. Pages, DNS lookups, WebRTC and IPv6 can each take a different path, so each has to be tested.

  1. 1BaselineVPN off: note your real addresses
  2. 2ExitsVPN on: does any exit match the baseline?
  3. 3DNSWho answers your lookups?
  4. 4WebRTCDoes UDP use the same exit?
  5. 5InterruptionWhat happens when the tunnel drops?

Without step 1 you can’t tell a leak from an address you don’t recognize.

Do them in this order, with the browser you normally use. It takes about ten minutes.

1. Record the baseline

Turn the VPN or proxy off. Open the network exit check and write down:

  • your IPv4 address and the provider's name
  • your IPv6 address, if there is one
  • the country

Everything after this is a comparison with these values.

2. Check the exits

Turn the VPN on, close and reopen the browser, and run the check again:

It asks several sites which address they see. None of the addresses should be in your baseline, and neither should your provider's name.

With the VPN onIPv4IPv6Verdict
Covers bothVPN’sVPN’sFine
Blocks IPv6VPN’sNoneFine
Ignores IPv6VPN’sYoursLeak
The most common leak of all: a home connection with IPv6 and a VPN that only handles IPv4.

Finding several exits isn't a problem in itself. VPN services use many addresses. What matters is whether one of them is yours. With split tunneling on, some sites are meant to see your own address, so turn it off for the test, or know which ones those are.

The IPv6 article explains how to fix an IPv6 leak.

3. Check DNS

Run the DNS leak check, choosing the extended test. Read the names of the networks, not just the verdict. It compares countries, so if your VPN exit is in your own country, a leak to your provider still shows as Correct. Your provider's name in the list means a leak. What is a DNS leak? has the causes and fixes.

4. Check WebRTC

Run the WebRTC leak check. An additional public IP that's in your baseline is a leak. Pay attention to any IPv6 address it lists. Why WebRTC shows another IP has the fixes.

5. Interrupt the tunnel

Most leaks people care about happen in the seconds when a VPN reconnects. A kill switch is meant to block everything until the tunnel is back. Test it: print your address once a second, and break the connection while it's running.

On macOS or Linux:

Terminal
while true; do echo "$(date +%T) $(curl -s -m 3 https://www.cloudflare.com/cdn-cgi/trace | grep '^ip=')"; sleep 1; done

On Windows, in PowerShell:

PowerShell
while ($true) { "$(Get-Date -Format T) $((curl.exe -s -m 3 https://www.cloudflare.com/cdn-cgi/trace) -match '^ip=')"; Start-Sleep 1 }

While it runs, switch the VPN to another server, turn Wi-Fi off and on, and put the computer to sleep for a minute. Stop with Ctrl+C. This is how a leak looks:

Output
21:04:11 ip=198.51.100.721:04:12 ip=198.51.100.721:04:13 ip=203.0.113.2421:04:1821:04:20 ip=198.51.100.9

The output is an illustration: 198.51.100.x stands for the VPN and 203.0.113.24 for the address in the baseline. An empty line is what you want to see during a reconnect. Your own address, even once, means that the kill switch is off or doesn't work.

Don't quit the VPN program as the test, since many stop blocking when you deliberately disconnect. Repeat with curl -6 if you have IPv6.

What a clean result is worth

A clean result inShows thatDoesn’t show that
Network exitThe sites on the list saw only the VPNSites not on the list see the same
DNS leakResolvers are in the exit’s countryYour provider isn’t among them
WebRTC leakThis browser’s UDP uses the same exitOther apps’ UDP does
InterruptionNothing got out that timeNothing will after a crash or an update
Each check has a limit. Together they cover what a browser normally does.

Repeat the test when something changes: a new version of the VPN or operating system, a new network, another browser. Phones need their own test, and so do apps that don't use the browser.

What no leak test can tell you

  • What the VPN provider sees. It replaces your internet provider in that position. No test from your side shows what it records.
  • Whether a site recognizes you. Cookies, sign-ins and your browser's characteristics have nothing to do with the address.
  • Whether a site knows it's a VPN. Look the exit address up on the home page to see whether it's listed as a proxy or datacenter address.

More in Privacy & leaks

DNS and WebRTC leaks, fingerprints and what sites see

All 10 articles