Home
My IP
GPS
Find Me
Your Location
4๏ธโƒฃIPv4: โ€”
๐Ÿ“...
6๏ธโƒฃIPv6: โ€”
๐ŸŒ...
๐Ÿข...
๐Ÿ“Œ...
Troubleshooting10 min read

WebRTC Leak: What It Is and How to Fix It

WebRTC can expose your real IP address even when using a VPN. Learn what WebRTC leaks are, how to test for them, and how to fix them in Chrome, Firefox, Brave, and other browsers.

By WhatIsMyLocation TeamยทUpdated April 1, 2026
WebRTC Leak: What It Is and How to Fix It

WebRTC Leak: What It Is and How to Fix It

You connected your VPN, confirmed your IP address changed, and thought you were fully protected. But there is a browser feature that can quietly expose your real IP address to any website that asks for it โ€” even through an active VPN connection. It is called WebRTC, and if you have never heard of it, you are not alone. Most people discover WebRTC leaks only after their privacy has already been compromised.

What Is WebRTC?

WebRTC (Web Real-Time Communication) is a browser technology that enables direct peer-to-peer communication for video calls, voice chat, file sharing, and screen sharing. It powers services like Google Meet, Discord (in-browser), and Facebook Messenger video calls.

For WebRTC to establish a direct connection between two users, it needs to discover the best network path. To do this, it uses a protocol called ICE (Interactive Connectivity Establishment), which gathers all available network interfaces on your device โ€” including your real local and public IP addresses.

Here is the problem: this IP discovery happens at the browser level, below the VPN tunnel. The browser's WebRTC implementation can bypass the VPN and reveal your actual IP to any website that runs a simple JavaScript snippet.

How WebRTC Leaks Work

When a website initiates a WebRTC connection (which requires no user permission), your browser:

  1. Queries all available network interfaces (Wi-Fi, Ethernet, VPN adapter)
  2. Gathers ICE candidates containing your IP addresses
  3. Sends these candidates to the website via JavaScript

A website does not need to actually establish a video call โ€” it only needs to start the ICE gathering process to collect your IPs. This takes milliseconds and happens silently.

What gets leaked:

  • Your real public IP address (the one your ISP assigned)
  • Your local/private IP address (e.g., 192.168.1.x)
  • Your VPN tunnel IP (which is fine โ€” this is expected)

The dangerous one is the first: your real public IP, which defeats the purpose of using a VPN.

How to Test for WebRTC Leaks

The quickest way to check is with our VPN Leak Test, which includes a dedicated WebRTC leak detection module.

Step-by-step test:

  1. Disconnect your VPN and visit My IP Address โ€” note your real IP
  2. Connect your VPN and verify your IP changed on the same page
  3. Now run the VPN Leak Test
  4. Check the WebRTC section โ€” if your real IP appears alongside the VPN IP, you have a leak

If only the VPN's IP (or no IP) appears in the WebRTC section, you are safe.

How to Fix WebRTC Leaks

Fix for Firefox

Firefox is the easiest browser to fix because it lets you disable WebRTC entirely through settings.

  1. Type about:config in the address bar and press Enter
  2. Accept the risk warning
  3. Search for media.peerconnection.enabled
  4. Double-click to set it to false

That is it. WebRTC is now completely disabled. The trade-off is that browser-based video calling (Google Meet in Firefox, etc.) will not work until you re-enable it.

Fix for Chrome

Chrome does not offer a built-in toggle to disable WebRTC. You have two options:

Option 1: Use an extension

Install a WebRTC leak prevention extension such as "WebRTC Leak Prevent" or "uBlock Origin" (which includes WebRTC control in its settings under "Privacy").

With uBlock Origin:

  1. Click the uBlock icon > Dashboard > Settings
  2. Check "Prevent WebRTC from leaking local IP addresses"

Option 2: Use Chrome flags (limited)

  1. Type chrome://flags in the address bar
  2. Search for "WebRTC"
  3. Set "Anonymize local IPs exposed by WebRTC" to Enabled
  4. Restart Chrome

Note: the Chrome flag only hides your local IP, not your public IP. An extension is more comprehensive.

Fix for Brave

Brave has built-in WebRTC leak protection:

  1. Open Settings > Privacy and security
  2. Find "WebRTC IP Handling Policy"
  3. Select "Disable non-proxied UDP"

This prevents WebRTC from using any network interface except the VPN, effectively blocking leaks while still allowing WebRTC functionality through the tunnel.

Fix for Edge

Microsoft Edge is Chromium-based, so the same extensions that work in Chrome work in Edge. Install a WebRTC leak prevention extension from the Edge Add-ons store or the Chrome Web Store.

Alternatively:

  1. Type edge://flags in the address bar
  2. Search for "WebRTC"
  3. Enable "Anonymize local IPs exposed by WebRTC"

Fix for Safari

Safari on macOS handles WebRTC more conservatively than Chromium browsers. By default, it restricts WebRTC to only expose the IP of the active network interface. However, for maximum protection:

  1. Open Safari > Preferences > Advanced
  2. Check "Show Develop menu in menu bar"
  3. Go to Develop > Experimental Features
  4. Look for WebRTC-related options and disable as needed

On iOS Safari, WebRTC leak protection is generally handled well by default, but using a VPN app with built-in leak protection adds an extra layer of safety.

Fix at the VPN Level

The best VPNs handle WebRTC leaks for you without requiring browser configuration:

  • NordVPN blocks WebRTC leaks through its browser extension and desktop app
  • Most premium VPNs with browser extensions include WebRTC leak protection
  • The VPN's kill switch also helps by blocking non-tunnel traffic

Using VPN-level protection means you do not have to configure each browser individually, and WebRTC still works for video calls โ€” it just uses the VPN IP instead of your real one.

Why Not Just Disable WebRTC Completely?

Disabling WebRTC entirely breaks some useful features:

  • Video conferencing โ€” Google Meet, Jitsi, and other browser-based video tools rely on WebRTC
  • Voice chat โ€” Discord's browser version uses WebRTC for voice
  • File sharing โ€” peer-to-peer file transfer tools in the browser need WebRTC
  • Screen sharing โ€” some remote support tools use WebRTC

If you use any of these services, completely disabling WebRTC is not practical. The better approach is to use a VPN with WebRTC leak protection, or browser settings that restrict WebRTC to only use the VPN's IP (like Brave's "Disable non-proxied UDP" option).

Understanding the Technical Details

For those who want to know exactly what is happening under the hood:

WebRTC uses STUN (Session Traversal Utilities for NAT) servers to discover your public IP. When a WebRTC connection is initiated, your browser sends a request to a STUN server, which responds with the public IP it sees. This STUN request can bypass the VPN because the browser makes it directly on the system's network interface rather than through the VPN tunnel.

The ICE candidates gathered during this process include:

  • Host candidates โ€” your local IP addresses (192.168.x.x, 10.x.x.x)
  • Server reflexive candidates โ€” your public IP as seen by the STUN server
  • Relay candidates โ€” TURN server addresses (these are safe)

A well-configured VPN intercepts STUN requests and routes them through the tunnel, ensuring the STUN server only sees the VPN's IP. This is why VPN-level protection is the most elegant solution.

Verify Your Fix

After applying any of the fixes above:

  1. Run our VPN Leak Test again
  2. Check that the WebRTC section shows no leak
  3. Confirm your IP at My IP Address matches the VPN server
  4. Review your overall exposure with our Browser Fingerprint tool and Privacy Score checker

Conclusion

WebRTC leaks are one of the most overlooked privacy vulnerabilities on the web. A website can discover your real IP address with a few lines of JavaScript, completely bypassing your VPN. The fix is straightforward โ€” either configure your browser, use a VPN with built-in WebRTC protection, or both.

Test regularly, especially after browser updates that can reset your settings. Your VPN is only as strong as its weakest point, and WebRTC is often that weak point.

W

WhatIsMyLocation Team

Our team of network engineers and web developers builds and maintains 25+ free networking and location tools used by thousands of users every month. Every article is reviewed for technical accuracy using real-world testing with our own tools.

Related Articles

Try Our Location Tools

Find your IP address, GPS coordinates, and more with our free tools.