Stop IP Leaks in Chrome and Firefox: Step-by-Step
In this article
This guide shows you how to prevent your real IP address from leaking in Chrome and Firefox, which is essential when you use a VPN, proxy, or just want to keep your browsing private. IP leaks can expose your location and identity even when you think you're anonymous. You'll learn to configure both browsers to block WebRTC leaks, disable IPv6 if needed, and verify that your traffic is going through the intended tunnel. No special tools are required beyond the browsers themselves and a few built-in settings.
What You'll Need
- Chrome or Firefox (or both) installed and updated
- Access to browser settings (no admin rights needed for most steps)
- A VPN or proxy service if you want to test that leaks are blocked (optional but recommended)
- A website that shows your public IP (e.g., a search for "what is my IP")
Step-by-Step
Block WebRTC Leaks in Chrome
- Open Chrome and type
chrome://flagsin the address bar, then press Enter. - In the search box at the top, type
WebRTC. - Look for the flag called Anonymize local IPs exposed by WebRTC. Set it to Enabled.
- Click Relaunch at the bottom of the page to restart Chrome with the change.
- After relaunch, WebRTC will no longer expose your local IP to websites. However, this flag only hides the local IP, not the public IP. To block public IP leaks via WebRTC, you need an extension like WebRTC Leak Prevent (available in the Chrome Web Store). Install it, then open its options and set IP handling policy to Disable non-proxied UDP or Force proxy.
Disable IPv6 in Chrome
- IPv6 can bypass your VPN if your VPN doesn't support it. To disable IPv6 in Chrome specifically, you can't do it from the browser settings, but you can force Chrome to use IPv4 by launching it with a command-line flag.
- Close Chrome completely.
- On Windows, right-click the Chrome shortcut, select Properties, and in the Target field, add
--disable-ipv6at the end (with a space before it). For example:C:\Program Files\Google\Chrome\Application\chrome.exe --disable-ipv6. - On macOS, open Terminal and run:
open -a "Google Chrome" --args --disable-ipv6. - On Linux, run
google-chrome --disable-ipv6from the terminal. - This forces Chrome to use IPv4 only, preventing IPv6 leaks.
Block WebRTC Leaks in Firefox
- Open Firefox and type
about:configin the address bar, then press Enter. - Click Accept the Risk and Continue if prompted.
- In the search bar, type
media.peerconnection.enabled. - Double-click the preference to set it to
false. This disables WebRTC entirely, which prevents all WebRTC-related IP leaks. If you need WebRTC for video calls, you can instead setmedia.peerconnection.ice.default_address_onlytotrue(this hides your local IP but still allows WebRTC to work). - To also hide your public IP in WebRTC, set
media.peerconnection.ice.proxy_only_if_behind_proxytotrueif you use a proxy, or use the WebRTC Leak Prevent extension for Firefox as well.
Disable IPv6 in Firefox
- Firefox uses the system's network stack, so disabling IPv6 at the browser level is not directly possible. However, you can disable IPv6 on your operating system, or you can configure Firefox to prefer IPv4 by setting
network.dns.disableIPv6totrueinabout:config. - Type
about:configin Firefox's address bar and accept the risk. - Search for
network.dns.disableIPv6. - Double-click it to set it to
true. This tells Firefox to not use IPv6 for DNS resolution, reducing the chance of IPv6 leaks.
Verify No Leaks
- After making the changes, restart your browser.
- Visit a website that shows your public IP, such as
whatismyip.comor just search "what is my IP" in Google. - Note the IP shown. Then visit a WebRTC leak test site (e.g.,
browserleaks.com/webrtc) and compare the IPs shown there. If the WebRTC test shows any IP different from your VPN/proxy IP, you still have a leak. - Also check if the IP shown is IPv6 or IPv4. If you see an IPv6 address and you intended to use IPv4 only, you need to disable IPv6 at the OS level or via the command-line flags mentioned above.
Common Mistakes
- Only disabling WebRTC in one browser – If you use both Chrome and Firefox, you must apply the changes in both, otherwise leaks persist in the other.
- Forgetting to restart the browser – Many settings only take effect after a full restart.
- Using a VPN that doesn't support IPv6 – Even if you disable IPv6 in the browser, the OS might still send IPv6 traffic outside the VPN. You need to disable IPv6 at the OS level if your VPN doesn't handle it.
- Assuming the built-in flag is enough – The Chrome flag only hides local IPs, not public IPs. You need an extension to fully block WebRTC public IP leaks.
- Disabling WebRTC entirely when you need it – If you use video conferencing, disabling WebRTC will break it. Use the more specific settings instead.
Tips
- Use a VPN that has built-in IPv6 leak protection. Many reputable VPNs handle this automatically.
- Regularly test your browser for leaks, especially after browser updates, as updates can reset some settings.
- If you use a proxy, make sure the proxy supports WebRTC traffic, or disable WebRTC entirely.
- For maximum privacy, consider using the Tor Browser, which is hardened against IP leaks by default.
- Keep your browser updated to benefit from the latest security patches that may address leak vectors.
Troubleshooting
Leak still shows after following steps?
- Check if your VPN is actually connected. Sometimes the VPN drops and your browser uses the real IP.
- Verify that the extension (if used) is enabled and not blocked by your browser's privacy settings.
- Try a different WebRTC leak test site, as some tests may not detect all types of leaks.
- If you disabled IPv6 via command-line, make sure the shortcut you use actually includes the flag. Some shortcuts may not be updated.
- If you set
media.peerconnection.enabledtofalsein Firefox, but still see WebRTC IPs, it might be because the browser was not fully restarted. Close all Firefox windows and reopen.
WebRTC is disabled but video calls don't work?
- You need to enable WebRTC again. Instead of disabling it entirely, use the more specific settings like
media.peerconnection.ice.default_address_onlyto hide your local IP while keeping functionality.
IPv6 still appears in test results?
- Disable IPv6 at the operating system level. On Windows, you can uncheck IPv6 in network adapter properties. On macOS, go to System Preferences > Network > Advanced > TCP/IP and set Configure IPv6 to Off. On Linux, use sysctl or your network manager.
Frequently Asked Questions
What is an IP leak?
An IP leak is when your real IP address is exposed to websites or services even though you're using a VPN or proxy. This can happen through WebRTC, IPv6, or DNS requests.
Why does WebRTC leak my IP?
WebRTC is a technology for real-time communication (like video calls) that can bypass proxies and VPNs to find the best network path. This process can expose your local and public IP addresses.
Will disabling WebRTC break video calls?
Yes, disabling WebRTC entirely will break video conferencing and other real-time communication features in your browser. Instead, use the more specific settings to hide your local IP while keeping WebRTC functional.
Does disabling IPv6 affect my internet speed?
In most cases, no. IPv6 and IPv4 offer similar speeds. Some networks may be slower over IPv6, but disabling it typically has no noticeable impact.
Can I use the same settings for both Chrome and Firefox?
No, the settings are different because each browser has its own configuration system. You need to apply the appropriate settings in each browser separately.
Do I need a VPN to prevent IP leaks?
No, you can prevent IP leaks without a VPN by disabling WebRTC and IPv6 as described. However, without a VPN, your IP will still be visible to websites—you're just preventing leaks when you do use a VPN.