What Is WebRTC? How It Works and When to Disable It
By Pavel Glukhikh · CEO, Nubinity LLC · Published March 14, 2023 · Updated August 28, 2026 · 11 min read
Quick answer
WebRTC (Web Real-Time Communication) is an open standard built into every major browser that lets pages make voice, video and data connections directly between devices, with no plugin. To open those peer-to-peer links it must discover the network addresses your device can be reached on, which is why it can reveal your real IP even while a VPN is connected. You can block that exposure per browser without giving up video calling.
WebRTC (Web Real-Time Communication) is an open standard, built into every major browser, that lets a web page open direct audio, video and data connections to another device without a plugin or download. It is why a video call can start from a link. To open those connections it first has to work out how your device can be reached across the network — and that address discovery is the reason WebRTC can reveal your real IP address to a website even while a VPN is connected.
That exposure is a disclosure problem, not a broken tunnel. Your VPN is still encrypting traffic; WebRTC is simply collecting addresses the tunnel does not cover.
- What it is: a browser-native standard for peer-to-peer audio, video and data — no plugin, no install.
- Why it exists: direct connections cut latency dramatically compared with relaying every packet through a server.
- Why it leaks: STUN address discovery can run outside the VPN tunnel and report your real IP to the page.
- What to do: block the leak per browser if you use in-browser calling; disable it entirely if you never do.
The core principle: WebRTC has to know how to reach you before it can connect you. Every privacy question about it follows from that one requirement.
Table of Contents
- How WebRTC actually works
- What WebRTC is actually used for
- Why WebRTC can expose your real IP address
- Do you actually need WebRTC enabled?
- How to disable WebRTC in your browser
- WebRTC on mobile
- How to verify your fix worked
- Key Takeaways
- What most WebRTC advice gets wrong
- Where a VPN fits
- Useful sources and further reading
How WebRTC actually works
WebRTC is a set of browser APIs plus the protocols underneath them. Three pieces matter for understanding both its speed and its privacy behaviour.
RTCPeerConnectionmanages the connection between two peers: codec negotiation, encryption, and the network path itself.MediaStream(getUserMedia) captures microphone, camera or screen. Browsers gate it behind an explicit permission prompt.RTCDataChannelcarries arbitrary data — file transfers, game state, chat — over the same peer connection.
The interesting part is how two browsers behind different home routers ever reach each other. Both sit behind NAT, so neither has a directly routable address by default. WebRTC solves this with ICE (Interactive Connectivity Establishment), which gathers every candidate address a peer might be reachable on:
- Host candidates — the local addresses on your machine, such as your LAN IP.
- Server-reflexive candidates — your public IP as seen from outside, discovered by asking a STUN server “what address did this request come from?”
- Relay candidates — an address on a TURN relay server, used only when a direct path cannot be established.
ICE then tests these candidate pairs and picks the one that works with the lowest overhead. Direct paths win when they are available, which is exactly the point: relaying every video packet through a central server adds latency and costs the operator bandwidth.
Media itself is encrypted — WebRTC mandates DTLS-SRTP, and there is no way to turn that off. The call content is not the exposure. The candidate list is.
What WebRTC is actually used for
WebRTC is far more widely deployed than most people realise, because it is usually invisible.
- Video meetings in a browser tab — Google Meet and the browser clients for Teams and Zoom.
- Voice and video in chat apps — Discord, Slack huddles, Facebook Messenger calls.
- Live customer support widgets — the in-page “talk to us” video and voice buttons on support sites.
- Screen sharing — the same
getUserMediapathway, capturing a display instead of a camera. - Peer-to-peer file transfer — browser-to-browser sending with no upload to an intermediate server.
- Cloud gaming and remote desktop — low-latency streaming where a server round trip would be disqualifying.
- IoT and camera feeds — viewing a doorbell or security camera live in a browser.
The common thread is latency. Anything where a half-second delay would ruin the experience has a reason to use WebRTC rather than conventional request-response HTTP.
Why WebRTC can expose your real IP address
The exposure follows directly from ICE candidate gathering. To build its candidate list, your browser sends STUN requests, and depending on the browser and platform those requests can be issued outside the VPN tunnel. The browser learns your real public IP, adds it to the candidate list, and JavaScript on the page can read that list.
No permission prompt is involved. Reading candidate addresses does not require camera or microphone access, so a page can do it silently on load.
Two details make this worse than it first appears:
- It bypasses the tunnel without breaking it. Your VPN is still working. Traffic is still encrypted. The IP simply arrives by a different route than the one the VPN controls.
- It is trivially scriptable. A few lines of JavaScript create a peer connection, collect the candidates, and post them to a server. This is a well-known fingerprinting technique.
If you want the leak-specific detail — how to test for it, what each reported address means, and how to fix it — that is covered in depth in what a WebRTC leak is and how to stop it.
Do you actually need WebRTC enabled?
This is the decision that determines which fix you should apply, and it comes down to one question: do you make calls inside your browser?
| Your situation | Recommended action |
|---|---|
| Video meetings happen in desktop or mobile apps only | Disable WebRTC entirely — nothing you use will break |
| You use Google Meet, Discord web, or in-page support calls | Apply the leak-only block; keep WebRTC functional |
| You are on a restrictive or monitored network | Block the leak, and verify after every browser update |
| You are unsure | Start with the leak-only block; it is reversible and low-risk |
Disabling WebRTC outright is the stronger privacy position, but it is genuinely disruptive if you rely on browser calling: the call will not connect at all, usually with an unhelpful error. The leak-only block is the sensible default because it removes the IP disclosure while leaving the feature working.
How to disable WebRTC in your browser
Only Firefox exposes a true native switch. Everything Chromium-based needs an extension or a flag that limits — rather than removes — address exposure.
Firefox
Firefox is the one browser with a real toggle, and it is the cleanest fix available anywhere.
- Type
about:configin the address bar and press Enter. - Click Accept the Risk and Continue.
- Search for
media.peerconnection.enabled. - Double-click it to change the value from
truetofalse. - Restart Firefox.
WebRTC is now off at the browser level, with no extension and no ongoing maintenance. To keep browser calling, skip this and use the uBlock Origin setting below instead.
Chrome
Chrome has no built-in toggle, and it has not had one for years. Two approaches work:
- uBlock Origin — if you already run it, open its Dashboard → Settings and tick Prevent WebRTC from leaking local IP addresses. This blocks the leak while leaving calling functional.
- A dedicated extension — WebRTC Leak Prevent or WebRTC Network Limiter, installed from the Chrome Web Store. These need no configuration after install.
Avoid extensions that promise to “disable WebRTC completely” but are unmaintained; an abandoned extension with broad permissions is a worse trade than the leak it fixes.
Microsoft Edge
Edge is Chromium-based, so the Chrome options above apply, and Edge additionally exposes a flag that anonymizes local addresses:
- Enter
edge://flagsin the address bar. - Search for
WebRTC. - Set Anonymize local IPs exposed by WebRTC to Enabled.
- Restart the browser.
Treat this as a partial measure. It masks local network addresses; it is not equivalent to blocking public-IP disclosure, so pair it with uBlock Origin’s setting for a complete fix.
Opera
Opera is also Chromium-based and installs Chrome Web Store extensions directly, so the uBlock Origin setting and the dedicated extensions both work. Opera additionally has a native handling option:
- Open Settings (
Alt + P). - Search for WebRTC.
- Set the IP handling policy to Disable non-proxied UDP.
That setting is worth knowing about because it also affects Opera’s built-in VPN, which is a browser proxy rather than a system-wide tunnel and does not protect traffic from other applications.
Yandex Browser
Yandex Browser is Chromium-based. Guides that tell you to open about:config and flip media.peerconnection.enabled are describing Firefox — that preference does not exist here and the page will not load. Use a Chrome Web Store extension, or uBlock Origin’s Prevent WebRTC from leaking local IP addresses setting, exactly as you would in Chrome.
Safari
Safari asks before granting a site access to WebRTC, which makes it the most conservative major browser by default. To restrict it further:
- Open Safari → Settings → Advanced and enable Show features for web developers.
- Open the Develop menu → WebRTC.
- Disable ICE Candidate Restrictions handling as needed for your setup.
Safari’s defaults are strong enough that most users need no change here.
Brave
Brave exposes the Chromium IP-handling policy directly in settings. Go to Settings → Privacy and security → WebRTC IP Handling Policy and choose Disable Non-Proxied UDP. No extension required.
WebRTC on mobile
Mobile is where most people quietly stay exposed, because the desktop fixes do not carry over.
- iOS — every browser uses Apple’s WebKit engine, so Safari’s behaviour applies across the board. There is no user-facing WebRTC toggle. A VPN configured at the system level with a working kill switch is the practical control.
- Android — Firefox for Android supports extensions including uBlock Origin, so the leak-only block works there. Chrome for Android does not support extensions and offers no toggle.
- In-app browsers — the webviews inside social and messaging apps generally inherit the system engine and cannot be configured at all. Open sensitive links in a real browser rather than the in-app one.
How to verify your fix worked
Never assume a change took effect. Verification takes under a minute.
- Connect your VPN and confirm it is actually up.
- Open a WebRTC leak test —
browserleaks.com/webrtcis the standard one. - Read the reported addresses. If only your VPN’s IP appears, the block is working. If your real public IP appears anywhere, it is not.
- Repeat in every browser you use. The fixes are per-browser, not system-wide.
Pro Tip: Re-test after major browser updates. An update can reset a flag, disable an extension pending a permissions re-grant, or migrate settings in a way that quietly restores the default behaviour — and nothing in the interface tells you it happened.
Key Takeaways
WebRTC’s privacy issue is a direct consequence of how peer-to-peer connections are established, which is why it needs a browser-level fix rather than a network-level one.
| Point | Details |
|---|---|
| Address discovery is the mechanism | ICE gathers candidates via STUN; those requests can travel outside the VPN tunnel and land in the page’s reach. |
| The call itself is encrypted | DTLS-SRTP is mandatory and cannot be disabled. The exposure is the candidate list, not the media. |
| Only Firefox has a real switch | media.peerconnection.enabled is a genuine off toggle. Chromium browsers need an extension or a limiting flag. |
| Match the fix to your usage | Disable outright only if you never make browser calls; otherwise use the leak-only block. |
| Verify per browser, and re-verify | Fixes are per-browser and can be silently reverted by an update. Confirm with a leak test. |
What most WebRTC advice gets wrong
Most articles on this topic frame WebRTC as a vulnerability. It is not. It is a standard doing precisely what it was designed to do, and the design goal — direct peer connections — is the reason browser video calls are usable at all. Treating it as a flaw leads people to disable it reflexively and then wonder why their meetings stopped connecting.
The second mistake is bigger: advising people to “use a VPN” as the fix. A VPN does not solve this on its own, because the disclosure happens inside the browser, above the tunnel. Anyone who installs a VPN, reads that it protects their IP, and never runs a leak test may be exposed for months with no indication anything is wrong. The VPN is not failing — it was never the right control for this particular path.
The honest framing is narrower and more useful. WebRTC can disclose your IP to a page. That matters a great deal if you are on a monitored network, reporting on a sensitive subject, or relying on a VPN to separate your identity from your activity. It matters much less if you are avoiding regional pricing on a shopping site. Set your response to your actual threat model, apply the browser-level fix, and verify it — rather than assuming any single tool covers everything.
Where a VPN fits
A VPN and a WebRTC block solve adjacent problems, and you generally want both. The VPN covers everything leaving your machine at the network layer. The browser block closes the one path that runs above it.
Veilock pairs AES-256-GCM encryption with DNS-over-HTTPS and a kill switch, so the network layer stays covered even when a connection drops mid-session — the moment when leaks are most likely. Its no-logs policy means the session metadata is never retained in the first place.
If you are setting this up properly, do it in this order: apply the browser fix above, connect the VPN, then run a WebRTC leak test and confirm only the VPN address appears. That sequence tells you both controls are working together, which is the only thing worth trusting. Choose tools on what your own testing shows, not on marketing claims.
Useful sources and further reading
- WebRTC API — MDN Web Docs — The reference documentation for
RTCPeerConnection, media capture and data channels. - RFC 8445: Interactive Connectivity Establishment (ICE) — The specification defining candidate gathering and connectivity checks.
- RFC 5389: Session Traversal Utilities for NAT (STUN) — How a device discovers its public address, the step behind the disclosure.
- webrtc.org — Getting started overview — The project’s own introduction to the stack and its components.
- BrowserLeaks: WebRTC leak test — The standard verification tool referenced throughout this guide.