WebRTC is the browser feature that makes video calls work without plugins. To connect two people directly, it needs to find out every address your device can be reached on, and that discovery process can hand your real public IP to a website's JavaScript even when your normal traffic goes through a VPN.
This was a big story around 2015, when people discovered that a few lines of script could unmask VPN users on many popular services. Browsers have tightened things since, but the leak is still possible depending on the browser, the VPN client and your settings, so it's worth knowing how to check.
How the leak works
When a page creates an RTCPeerConnection, the browser gathers "ICE candidates", which are possible addresses for a direct connection. There are three kinds that matter:
- Host candidates: your local network addresses, like 192.168.1.23.
- Server-reflexive candidates: your public IP as seen by a STUN server. The browser sends a small UDP packet to a STUN server and the server replies "you appear to be 203.0.113.50".
- Relay candidates, via a TURN server, which aren't the problem here.
The page's JavaScript can read these candidates. No permission prompt is needed just to gather them. If the STUN request goes out over your physical connection instead of the VPN tunnel (which happens with some split-tunnel setups, misconfigured clients, or browser-level proxy extensions), the reflexive candidate is your real ISP-assigned IP.
This is why browser "VPN" extensions are especially prone to it. Most are really HTTPS proxies that only carry the browser's web requests. WebRTC's UDP traffic doesn't go through the proxy at all.
What changed in modern browsers
Around 2019 and 2020, Chrome and Firefox started hiding local IP addresses behind randomly generated .local mDNS names when a page hasn't been granted camera or microphone access. That fixed most of the local-address exposure, which was a fingerprinting problem more than an anonymity one.
The public IP leak is a different matter. With a proper system-wide VPN that routes all traffic, the STUN request goes through the tunnel and the server sees the VPN's address, so there's nothing to leak. The danger remains with proxy-style extensions, split tunnelling, and VPN clients that let UDP escape.
Testing
Connect your VPN, then open browserleaks.com/webrtc or ipleak.net. Look at the "Public IP address" lines under WebRTC. If anything there matches your real ISP address (check it with the VPN off first), you have a leak. If the field shows only the VPN's IP, or WebRTC is reported as unavailable, you're fine for that browser.
Test every browser you actually use. They behave differently.
Turning it off or limiting it
| Browser | Setting |
|---|---|
| Firefox | Go to about:config, set media.peerconnection.enabled to false. Disables WebRTC completely. |
| Brave | Settings, Privacy and security, "WebRTC IP handling policy". Choose "Disable non-proxied UDP". |
| Chrome / Edge | No built-in switch. Google's own "WebRTC Network Limiter" extension sets the IP handling policy. uBlock Origin also has "Prevent WebRTC from leaking local IP addresses" in its settings. |
| Safari | Fairly conservative by default and doesn't expose local IPs to pages without permission. No simple user toggle; rely on a system-wide VPN and test it. |
| Tor Browser | Already disabled. Nothing to do. |
The "Disable non-proxied UDP" policy is a reasonable middle ground. Video calls still work if they can go through a proxy or TURN relay, but the browser won't send UDP outside it.
In Firefox, if you'd rather keep WebRTC for calls, leave it on and instead make sure your VPN is a system-level client with leak protection. That's the better fix anyway, because it also covers DNS leaks and every other app on the machine.
Where this fits
A WebRTC leak only matters if you're hiding your IP from the sites you visit. If you use a VPN purely to stop your ISP or café Wi-Fi seeing your traffic, a leaked IP to the website isn't a big deal. If you're using a VPN as a cheap anonymity layer, it's a serious one, and frankly that's one of several reasons we suggest Tor Browser for that job instead (see Tor vs VPN).
WebRTC is also a fingerprinting surface even when it isn't leaking. The list of media devices, codec support and network behaviour all add bits to your browser fingerprint. Tor Browser disables it for both reasons. For background on the general protocol, the WebRTC glossary entry has a short summary.