How to test a VPN for IP, DNS and IPv6 leaks
A VPN is only doing its job if all of your relevant traffic goes through it. These checks show whether your real address, DNS queries or IPv6 traffic are escaping the tunnel.
What a leak is
A leak means some traffic or identifying data bypasses the VPN. The common cases are IPv4 traffic going around a broken tunnel, IPv6 traffic using the normal connection because the VPN only handles IPv4, DNS queries going to your ISP's resolver, and applications bound to the physical interface instead of the tunnel. Each has a different check and a different fix.
1. Compare your public IP
Record your address with the VPN off, then turn it on and check again. The address with the VPN on should be the VPN's exit address, and its country should match the exit you selected.
curl -s https://wheremyip.com/api/ip?format=text
Do the check more than once. Some VPNs reconnect to a different server, and split tunnelling can send different apps through different routes. If the address is unchanged with the VPN on, the tunnel is not carrying your traffic.
2. Check IPv6 separately
Many VPNs still tunnel IPv4 only. If your connection has IPv6, sites that support it may see your real IPv6 address while IPv4 goes through the VPN. Test with IPv6 enabled, then again with it disabled in the operating system or router.
- If the IPv6 address is yours rather than the VPN's, the VPN is not protecting IPv6.
- Fixes: choose a VPN with IPv6 support, enable its IPv6 leak protection, or disable IPv6 on the device while the VPN is in use.
3. Check DNS resolution
DNS queries reveal which sites you look up even when the page traffic is encrypted. Your VPN should either run DNS through the tunnel or use its own resolvers. A DNS leak test shows which resolver network answered your lookups.
Run a reputable DNS leak test with the VPN on. If the resolver belongs to your ISP and is in your home country while the VPN exit is elsewhere, DNS is escaping. Fixes include enabling the VPN's DNS protection, setting the tunnel's DNS servers manually, or using an encrypted resolver inside the tunnel.
Note that DNS-over-HTTPS and DNS-over-TLS can hide the query from your ISP but do not by themselves hide your IP from the sites you visit.
4. Understand WebRTC exposure
WebRTC can reveal addresses to a page through ICE candidates. Modern browsers mitigate this: Chrome uses mDNS hostnames for local candidates, and Safari and Firefox restrict local address exposure. Public addresses can still appear in some configurations. A WebRTC test in the browser shows what a page can see.
If a test exposes your real public address while the VPN is on, check the browser's WebRTC settings and the VPN's leak protection. Disabling WebRTC entirely breaks video calls, so prefer a VPN that handles it.
5. Check apps and torrent clients
Browser tests do not cover desktop applications. A torrent client, game launcher or voice app can bind to the physical network interface and bypass the tunnel. Most torrent clients let you bind to a specific interface or IP; bind to the VPN adapter and confirm the client's own connection log shows the VPN address. Use a kill switch so traffic stops if the tunnel drops.
Interpreting the results
| Symptom | Likely cause |
|---|---|
| Public IP unchanged | Tunnel not active, split tunnelling, or app bypassing it |
| IPv4 changed but IPv6 did not | VPN lacks IPv6 support or leak protection |
| Correct exit IP, ISP resolver | DNS not tunnelled |
| Page shows VPN IP, WebRTC shows real IP | Browser ICE leaking a public address |
| Only one app leaks | App bound to the wrong interface |
What a VPN does not hide
A VPN hides your address from the sites you visit and from your local network, but it does not make you anonymous. Logins, cookies, browser fingerprints, account history and the VPN provider's own records can still link activity to you. If your threat model includes a determined adversary, a commercial VPN alone is not enough.
For a quick check of what a site sees right now, use the IP lookup or inspect your request headers. To understand why a VPN exit can still look like the wrong country, read why IP location is often wrong.
Check your own connection
See your public IP address, inspect the headers your browser sends, or work out a network range with the subnet calculator. More background in the guides index.