How to Disable WebRTC Leaks in Chrome and Firefox
By the ProxyV4 Engineering Team · Updated:
To stop a WebRTC leak, turn WebRTC off in Firefox with media.peerconnection.enabled = false, and in Chrome set the WebRTC IP handling policy to disable_non_proxied_udp through a policy or an extension. Both stop the browser from sending STUN requests outside your proxy, which is how a page can learn your real public IP. Finish by loading a leak test in the same browser profile.
What a WebRTC leak is and why a proxy does not stop it
WebRTC powers voice, video and data channels between browsers. To find a network path between two peers, the browser gathers ICE candidates: its local interface addresses (host candidates) and the public address a STUN server sees (server-reflexive candidates). A page can start this process with a few lines of JavaScript and read the candidate list without asking for camera or microphone access.
HTTP and most SOCKS5 proxy setups only carry TCP traffic, and STUN normally runs over UDP. With default settings the browser sends those UDP probes straight out of your real network connection, so the server-reflexive candidate contains the public IP of your ISP, not the proxy. That is the leak: the page sees the proxy IP in normal requests and your own IP in WebRTC.
Local addresses are less of a problem than they used to be. Current Chrome and Firefox versions hide host candidates behind random .local mDNS names by default, so the address that usually leaks today is the public one.
Disable the WebRTC leak in Chrome and Chromium browsers
Chrome has no single switch that turns WebRTC off. It controls leaks through an IP handling policy with four values: default, default_public_and_private_interfaces, default_public_interface_only and disable_non_proxied_udp. Only the last one keeps WebRTC from using a path that bypasses the proxy: the browser uses TCP on the public interface and UDP only if the proxy supports it. Calls may get worse quality or fail, which is the trade-off.
Option 1: an extension that sets the policy
Extensions can set this value through Chrome's privacy.network.webRTCIPHandlingPolicy API. Google publishes one called WebRTC Network Limiter, and several proxy managers include the same toggle. Choose the option labeled along the lines of "use my proxy server (if present)" or "disable non-proxied UDP" (labels vary by extension). The setting applies to the profile where the extension is installed, so repeat it in each profile you use with a proxy.
For the proxy itself, see the Chrome proxy setup guide. Chrome's own --proxy-server flag has no field for a username and password, so authenticated proxies usually go through an extension anyway.
Option 2: a managed policy for every profile
On machines you administer, set the enterprise policy WebRtcIPHandling to disable_non_proxied_udp. On Linux, place a JSON file in /etc/opt/chrome/policies/managed/ (Chromium uses /etc/chromium/policies/managed/). On Windows, the same value goes under HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome as a string, usually deployed with Group Policy templates.
{
"WebRtcIPHandling": "disable_non_proxied_udp"
}Restart Chrome, open chrome://policy and check that WebRtcIPHandling is listed with status OK. If it is missing, your Chrome version may predate the policy; use the extension method instead.
Disable WebRTC in Firefox with media.peerconnection.enabled
Firefox exposes WebRTC through preferences in about:config, so no add-on is needed. Open about:config in a new tab and accept the warning.
Turn WebRTC off completely
Search for media.peerconnection.enabled and set it to false. Pages can no longer create an RTCPeerConnection, so there are no ICE candidates to read. This is the simplest fix if you do not use browser-based calls in that profile. Sites that rely on WebRTC, such as web meeting tools, will stop working until you set it back to true.
Keep calls but force them through the proxy
If you still need WebRTC, leave it enabled and set media.peerconnection.ice.proxy_only to true. Firefox then gathers candidates only through the configured proxy, which usually means TCP relays; some calling services will not connect this way. media.peerconnection.ice.default_address_only set to true limits candidates to the default route, and media.peerconnection.ice.no_host set to true drops host candidates. Preference names can change between releases, so search for media.peerconnection.ice to see what your version offers.
For the proxy settings themselves, including the option to send DNS through a SOCKS5 proxy, see the Firefox proxy setup guide.
Check the result with a WebRTC leak test
Checking your normal exit IP is not enough, because WebRTC runs separately from page requests. Open the WebRTC leak test in the same browser profile, with the proxy connected. A fixed setup shows either no WebRTC candidates or only the proxy's address. If your home or office IP still appears, the policy did not apply: check chrome://policy, the extension's toggle, or the Firefox preference you changed.
Then open the my IP tool to confirm the normal exit address is the proxy and the location is the one you ordered. Repeat both checks after browser updates, since a reset profile or a removed extension brings the leak back.
Multi-profile and antidetect browsers have their own WebRTC setting per profile (labels vary by app). Set it to follow the proxy or to disabled, then run the same test inside each profile. These tools are for keeping legitimate work apart, such as separate client or team profiles; follow each platform's rules on multiple accounts.
When a ProxyV4 proxy fits a leak-free setup
Fixing WebRTC only matters if the proxy behind it is the address you want sites to see. ProxyV4 sells private datacenter IPv4 in seven countries (United States, Vietnam, Japan, South Korea, Singapore, United Kingdom, Hong Kong) and static ISP proxies registered to consumer internet providers in the United States and Vietnam. Each IP has one tenant for the whole term, and it stays the same while the proxy is active and when you renew before expiry.
Every paid proxy supports HTTP(S), and private IPv4 outside Vietnam and US static ISP proxies also support SOCKS5 with username and password login, delivered as ip:port:user:pass. On the order's page you choose HTTP only, SOCKS5 only, or both on the same port; switching can move the proxy to a new port, so copy the line again afterwards. Traffic on private IPv4 and static ISP is never metered.
Where it does not fit: our proxies do not carry WebRTC media for you, so the browser settings above are still required. If you need an IP that changes on every request, rotating proxies are waitlist-only and not on sale. IPv6 proxies are a separate product that only works on IPv6-ready sites; private IPv4 works on every IPv4 and dual-stack site. If a workflow depends on UDP, ask support through a ticket before ordering. Check live prices, buy one IP and run the leak test with it before scaling.
Frequently asked questions
Does disabling WebRTC break normal browsing?
Ordinary pages, downloads and most video streaming keep working. Browser-based calls, some meeting tools and in-browser voice chat need WebRTC and will fail or degrade.
Is there a chrome://flags switch to turn WebRTC off?
Not in current Chrome. Use the WebRtcIPHandling policy or an extension that sets the IP handling policy to disable_non_proxied_udp.
Does a SOCKS5 proxy stop WebRTC leaks on its own?
No. Unless the browser is told to keep WebRTC on proxied paths, it can still send STUN requests over your direct connection.
Does a VPN fix WebRTC leaks?
A full-tunnel VPN routes UDP too, so the STUN request leaves through the VPN. A browser proxy does not, which is why the browser settings matter when you use one.
Will my proxy IP stay the same when I renew?
Yes. With ProxyV4, the IP stays the same while the proxy is active, and renewing before expiry keeps the same address.
What if the proxy itself does not work?
A proxy that fails for a technical reason, such as not connecting or showing the wrong location, is covered by the refund policy and credited to your account balance.
Leak-free browser plus a private IP
Pair the settings above with a private IPv4 or static ISP proxy that keeps its address on renewal, with HTTP(S) and SOCKS5 on one line. Start with one IP and run the leak test.
Order one IP