WebRTC leak: what it is and how to fix it
WebRTC lets a web page open a direct connection to another browser — for calls, video chats, file sharing. To do that, it has to find out your addresses. That is where the leak comes from.
How the leak works
When a page starts WebRTC, your browser collects every address it could be reached on. It asks a public STUN server “what IP do you see me from?” and lists the local network addresses of your device. Any script on the page can read that list. No permission prompt appears.
Behind a properly configured VPN, the STUN server sees the VPN's address and nothing is lost. The leak happens when that request goes around the tunnel — because of split tunnelling, a browser-only VPN extension, or IPv6 that the VPN doesn't cover. Then the page learns your real public IP.
How to test for it
Run our inspection with your VPN on. Section 03 lists the addresses WebRTC reveals:
- Safe — WebRTC shows nothing beyond the IP your connection already uses.
- Leak — a different public IP appears. With a VPN on, that is almost always your real one.
- Check — an address of a different type appears (IPv6 next to an IPv4 VPN, or a local network address). Compare it with your IP without the VPN.
How to fix it
Use the VPN app, not only an extension
A full VPN app routes all traffic, including WebRTC, through the tunnel. Many VPN extensions also include a “block WebRTC” switch — check the extension settings.
Firefox
Type about:config in the address bar, accept the warning, search for media.peerconnection.enabled and set it to false. This turns WebRTC off completely, so browser-based calls (Google Meet, Discord in the browser) will stop working until you switch it back.
Brave
Settings → Privacy and security → WebRTC IP handling policy. Choose “Disable non-proxied UDP”. Calls keep working, and WebRTC uses only the route your VPN or proxy provides.
Chrome and Edge
There is no built-in switch. Two options: install Google's own WebRTC Network Limiter extension, or if you use uBlock Origin, open its settings and tick “Prevent WebRTC from leaking local IP addresses”. Some ad blockers and VPN extensions have a similar option.
Safari
Safari is stricter by default and hides local addresses, but it can still expose a public IP if the VPN doesn't cover that route. Use a system-wide VPN app on macOS and iOS rather than a proxy-only setup.
Disable IPv6 if your VPN doesn't support it
If the leaked address looks like 2a02:… or similar, it's IPv6. Either enable IPv6 support or IPv6 leak protection in the VPN app, or turn IPv6 off in your network adapter settings.