Why a VPN can leak your IP through WebRTC
WebRTC is what lets you make video calls in the browser without installing anything. To connect two people directly, the browser needs to know its own addresses, so it asks a STUN server "which IP do you see?". Any website can trigger that with a few lines of JavaScript, without asking you.
With a VPN, all your traffic should go through the tunnel. But some VPN apps, browser extensions and proxies only route normal web traffic, and the STUN request goes out through your real connection. The page then learns your real IP, and the VPN loses its point.
How this test works
- We read the IP websites see, the same as What Is My IP.
- Your browser gathers its WebRTC candidates with Cloudflare's public STUN server.
- We compare them: a public address that is not the one websites see is a possible leak.
How to stop the leak
- VPN app: turn on its WebRTC or "leak protection" option, and its IPv6 block if it has one.
- Firefox: in
about:config, setmedia.peerconnection.enabledto false (video calls in the browser will stop working). - Chrome, Edge, Brave: use an extension that limits WebRTC to the VPN's network interface. Brave has the setting built in ("WebRTC IP handling policy").
Run the test again after each change. To check which ports of your connection are reachable from the internet, use the Open Port Checker.