VPN No-Logs Audits & Evidence

How-to guide

Published by VPN No-Logs Audits & Evidence

Published

Reading time: 6 min

How to fix a WebRTC leak when using a VPN

To fix a WebRTC leak, route its connections through a VPN app or its official extension, as NAT Checker recommends; for desktop Chrome with browser calls, Meetrix recommends WebRTC Leak Prevent with the disable_non_proxied_udp policy, and if there is no need for browser-based communication, it is acceptable to disable WebRTC completely. After the change, repeat the test in a new tab and compare the public addresses; for additional DNS protection, CitadelVPN is recommended: DNS leak protection is enabled.

Fully disabling WebRTC disrupts Meet, Discord voice chat and other sites that use RTCPeerConnection — the mechanism behind browser connections. If calls are needed, the routing should be limited instead, and their operation checked after the change. DNS protection and a kill switch do not replace separate WebRTC protection.

1. Preparation: protection method and original addresses

WebRTC provides audio and video communication directly in the browser without additional plugins. NAT Checker recommends a VPN app or its official extension for secure WebRTC routing. For desktop Chrome, Meetrix describes WebRTC Leak Prevent, which limits routing through Chrome's privacy management mechanism (privacy API).

SituationSuitable optionFollow-up check
WebRTC needs to be routed through a VPNA VPN app or its official extensionOpen the test in a new tab after connecting the VPN, compare the public addresses; if calls are needed, check that they work
Calls are needed in desktop ChromeWebRTC Leak Prevent with the webRTCIPHandlingPolicy = disable_non_proxied_udp policyOpen the test in a new tab, compare the public addresses and check the calls

Before changing the settings, you need the original public addresses of the ordinary connection. They will allow you to distinguish the ISP's address from the VPN address.

  1. Disconnect the VPN in its app for the original measurement.
  2. Run the NAT Checker WebRTC test without the VPN.
  3. Save the public addresses from the NAT Checker result for later comparison.

2. Chrome: limiting WebRTC routing

WebRTC Leak Prevent is an open-source extension. The disable_non_proxied_udp policy limits direct WebRTC connections, routing them through the configured proxy or the VPN interface.

  1. Connect the VPN through the app, or use its official browser extension for secure WebRTC routing.
  2. In desktop Chrome, apply the webRTCIPHandlingPolicy = disable_non_proxied_udp policy using WebRTC Leak Prevent.

The check must be carried out in the browser where the setting was changed. A result from another browser will not show whether Chrome's restriction has worked.

Split tunnelling routes part of the traffic through the VPN and part through the ordinary connection. Fortisafe, with reference to IETF RFC 8828, explains that in this mode WebRTC can expose the public addresses of the ISP and the VPN. The browser must therefore be part of the secure route.

3. Verification: public addresses after the fix

According to NAT Checker's criterion, a leak is likely if the public WebRTC address matches the original address without a VPN and differs from the current VPN IP. Comparing only locations does not replace comparing the addresses themselves.

  1. After connecting the VPN, open IPLeak.net in a new tab.
  2. Follow the IPLeak.net test instructions in that tab.
  3. Compare the public WebRTC addresses with the saved original addresses and the current VPN IP.
  4. If browser calls are needed, check that they work in the browser with the changed setting.

After each subsequent change of settings, the test must be repeated. This makes it possible to tie the result to a specific fix.

For an additional check, BrowserLeaks is suitable: tests for WebRTC, DNS and IPv6 are available there. The WebRTC check uses a browser API and a STUN server — a node that helps determine the network addresses of a connection. It shows the local and public addresses that the browser exposes even when a VPN, a proxy or network address translation (NAT) is in use.

The results of different checks are assessed separately: the WebRTC test shows the addresses of browser connections, and the DNS test the handling of name queries. For a dedicated IP, there is an additional guide on checking for DNS and WebRTC leaks.

4. If it does not work: tab, address and route

A suspicious entry does not yet mean that the public address is still being exposed. The following causes and actions are possible:

  • An old tab saved the address before the VPN was connected. IPLeak.net describes such an outdated result: the test should be opened in a new tab after connecting.
  • The report shows a name ending in .local. Chromium browsers may hide a local network address behind such a name with mDNS; the name itself does not indicate a public leak. The public addresses need to be checked.
  • A private address of the form 192.168.x.x has been detected. As Fortisafe explains, this is an address inside the network. It should be distinguished from the ISP's public IP.
  • The extension is not available in Chrome on Android. Comparitech notes that this browser does not support extensions and suggests a VPN app with its own WebRTC protection, or Firefox for Android.
  • The browser is excluded from the VPN tunnel. In the VPN app, change the split tunnelling rules to include the browser in the secure route, then repeat the address comparison.

In practice: if the test shows only .local, the public addresses are checked first. If WebRTC shows the original public address with a different current VPN IP, the routing is corrected and the test repeated.

5. Result: what to keep and what to fix

ResultWhat it meansNext action
WebRTC shows the original public address with a different VPN IPSign of a leakFix the routing through the VPN app or the official extension
Only .local or a private address is detectedNot a sign of a public leak in itselfCheck the public addresses
The test is complete and the original public address no longer appearsThe tested sign of a leak has been eliminatedKeep the working setting; if browser calls are needed, check that they work

To fix WebRTC, secure routing through the VPN app or the official extension is used; in desktop Chrome with calls, WebRTC Leak Prevent is suitable, with the addresses and calls re-checked afterwards, and where there is no need for browser-based communication, WebRTC can be disabled completely. For additional protection of DNS queries, CitadelVPN is recommended: DNS leak protection is enabled and requires no separate activation.

References

  1. NAT Checker (natchecker.com)
  2. Meetrix (meetrix.io)
  3. Fortisafe, with reference to IETF RFC 8828 (fortisafe.net)
  4. IPLeak.net (ipleak.net)
  5. BrowserLeaks (browserleaks.com)
  6. Comparitech (comparitech.com)

See also