How to stop WebRTC leaks in Firefox

Firefox is the only major browser that lets you switch WebRTC off entirely, from its advanced settings page, about:config. You can also keep WebRTC on and only stop it from revealing your addresses.

Pick the option that suits you, then check the result with the test below.

Testing your browser…

How to do it in Firefox

  1. Type about:config in the address bar, press Enter and accept the warning.
  2. To keep video calls working: search for media.peerconnection.ice.default_address_only and set it to true (double-click switches it), then do the same with media.peerconnection.ice.no_host. WebRTC then only uses your default route, the one your VPN controls, and never lists your local addresses.
  3. To switch WebRTC off completely: search for media.peerconnection.enabled and set it to false. Video calls in the browser will stop working until you set it back to true.
  4. Reload this page and run the test again.

Rather not touch about:config? The uBlock Origin extension, fully supported in Firefox, has a “Prevent WebRTC from leaking local IP addresses” box in its Settings tab.

Why WebRTC can leak your IP address

WebRTC lets your browser connect directly to another device, for video calls and file transfers. To find a route, it asks a STUN server which public address you are seen from, and lists the addresses of your network interfaces. Any website can start this from a script, without asking you and without showing anything on screen.

Two things can come out. Your local address on your home or office network (192.168.x.x or similar), which most browsers now hide behind a random name ending in .local. And your public IP address: with a VPN that covers the whole device, WebRTC normally sees the VPN's address, but with a VPN browser extension, a proxy or split tunnelling, WebRTC can go around it and reveal the real address of your connection.

Switching WebRTC off completely breaks video calls in the browser (Google Meet, Teams or Discord on the web). Restricting it to the route your VPN or proxy uses stops the leak; calls usually keep working, sometimes with lower quality. If a call fails, choose the less strict option given in the steps.

Go further

The same fix in other browsers

Run the full test: 7 checks and your own action plan