When discussing online privacy and VPNs, the topic of WebRTC leaks and vulnerabilities often comes up.
While the WebRTC issue is often associated with VPNs, this is in fact a vulnerability with web browsers – Firefox, Opera, and Chrome.
So what is WebRTC?
WebRTC stands for “Web Real-Time Communication”. This basically allows for voice, video chat, and P2P sharing within the browser (real-time communication) without adding extra browser extensions – further described on Wikipedia here.
While this feature may be useful for some users, it poses a threat to anyone using a VPN and seeking to maintain online anonymity without their real IP address being revealed.
The WebRTC Vulnerability
The fundamental vulnerability with WebRTC is that your true IP address can be exposed via STUN requests with Firefox, Chrome, and Opera browsers, even when you are using a VPN.
Daniel Roesler exposed this vulnerability in 2015 on his GitHub page, where he stated:
Additionally, these STUN requests are made outside of the normal XMLHttpRequest procedure, so they are not visible in the developer console or able to be blocked by plugins such as AdBlockPlus or Ghostery. This makes these types of requests available for online tracking if an advertiser sets up a STUN server with a wildcard domain.
Will a VPN protect me against WebRTC leaks?
Just like with browser fingerprinting, the WebRTC issue is a vulnerability with web browsers – not VPNs. As such, it is best to address the root cause of the issue by fixing the vulnerability with your browser, which we will cover below.
Nonetheless, there are some VPNs that protect against WebRTC vulnerabilities. I have tested two VPNs that protect users against WebRTC leaks via firewall rules:
- Perfect Privacy – The Perfect Privacy VPN clients are configured to protect against WebRTC vulnerabilities. I verified this with Windows and Mac OS.
- ExpressVPN – ExpressVPN has recently updated their software to further protect users against WebRTC leaks. I tested the updated software on Windows and Mac OS and verified that it protects against WebRTC leaks.
Note – Given that the WebRTC vulnerability is a tricky issue, it is still best to fix the problem in your browser, rather than relying solely on a VPN for protection.
Here are three different options for dealing with the WebRTC issue:
1. Disable WebRTC in the browser (Firefox) and only use browsers with disabled WebRTC capability. (Instructions are below.)
2. Use browser add-ons or extensions if disabling WebRTC is not possible. (Disabling WebRTC is not possible with Chrome and Chromium-based browsers, such as the Brave browser.)
Note: browser add-ons and extensions are not 100% effective. Even with add-ons, the vulnerability still exists in the browser to reveal your true IP address with the right STUN code. (Therefore don’t use Chrome.)
Tor browser – Another option is to use the Tor browser (with the Tor network disabled). This is a hardened version of Firefox that has WebRTC disabled by default, along with other protections built into the browser. You can get more information on the Tor browser here, along with instructions for disabling the Tor network and using it with a VPN service. (Note: the Tor browser may be overkill for some users.)
WebRTC fixes and add-ons
Below are different fixes for various browsers.
Disabling WebRTC is very simple in Firefox. First, type about.config into the URL bar and hit enter. Then, agree to the warning message and click “I accept the risk!”
Then, in the search box type “media.peerconnection.enabled“. Double click the preference name to change the value to “false“.
That’s it. WebRTC is completely disabled in Firefox and you won’t have to worry about WebRTC leaks.
Chrome WebRTC (desktop)
Since WebRTC cannot be disabled in Chrome (desktop), add-ons are the only option (for those who do not want to just give up on using Chrome).
As pointed out above, it is important to remember that browser add-ons are not 100% effective. In other words, you may still be vulnerable to WebRTC IP address leaks under certain circumstances. Nonetheless, here are some add-ons that may be worth considering:
Another obvious solution is to stop using Chrome, which gives Google your data.
Chrome WebRTC (mobile)
On your Android device, open the URL chrome://flags/#disable-webrtc in Chrome.
Scroll down and find “WebRTC STUN origin header” – then disable it. For safe measure, you can also disable the WebRTC Hardware Video Encoding/Decoding options, though it may not be necessary.
Note: Android users can also also install Firefox, and disable WebRTC via the steps above.
Just like with Chrome, the only way (as of now) to address the WebRTC vulnerability in Opera is to use an extension.
First, download the extension “WebRTC Leak Prevent” to your Opera browser.
Then in the Advanced options for the WebRTC Leak Prevent extension, select “Disable non-proxied UDP (force proxy)” and then click Apply settings.
Again, because this is an extension solution, it is not 100% safe or effective.
Conclusion on WebRTC browser vulnerabilities
The WebRTC vulnerability highlights a very important concept for those seeking a higher level of online anonymity and security through various privacy tools.
The browser is usually the weak link in the chain.
The WebRTC issue also shows us that there may be other vulnerabilities that exist with our privacy setup, which we are not even aware of. (The WebRTC issue was not publicly known until 2015.)
One other problem to be aware of is browser fingerprinting. This comes into play here because adding more extensions and add-ons to your browser actually makes you more easy to identify and track. Consequently, this is another reason to simply go with Firefox and manually disable WebRTC, rather than using Chrome with add-ons. (Or use the Tor browser with a VPN.)