Any site that I visit can see my local IP (e.g. Is there any reliable way to block this behavior? (browser setting, OS setting, router setting, etc.) I am particularity interested in Google Chrome and Mozilla Firefox, but any modern open source browser will do. If it is a browser plugin, it should be open source with a solid user base.

By reliable I mean, that I do not need to check the leakage again after every software update.

More info / what I have read so far:

  • There was a Chrome plugin that is not working anymore
  • Local IP is obtained using JavaScript / WebRTC
  • Firefox developers is not going to fix the leak (bug is open from 2014): Bug 959893
  • In Private / Incognito mode does not prevent this leak. If you use static IPs, and have non typical local IP (e.g. or, then there is no need for Browser fingerprinting . Your external IP + internal IP is perfect fingerprint.

Update 1: It is not duplicate of How to Disable WebRTC in Google Chrome - I want to prevent private / local IP leak, not disable all WebRTC.

Update 2: No, it is not related to header X-Forwarded-For (HTTP_X_FORWARDED_FOR), that is added when user/administrator chooses to do so. In my provided demo it is not your choice... It is Google's and Mozilla's choice to leak your private IP even when using private browsing mode.

Update 3: Ability to determine my local IP allows malicious JavaScript to quickly identify my local subnet and print on my local network printers from any website in the world without me doing anything. Cross-site printing This CSP Demo finds my LAN printers using JavaScript.

Update 4: It is not a good idea to reveal private IP to every website. By seeing your private IP, for example, I can guess with very high probability that you are using MikroTik router. Also, I can track particular user event if user uses different browsers because local and remote IP stays the same for some time (hours or even days).


2 Answers 2


Disable WebRTC with extensions:

In Firefox with addon Disable WebRTC or advanced users can use about:config to set media.peerconnection.enabled to false.

In Chrome with extension WebRTC Leak Prevent

  • 1
    In firefox you don't even need a extension, tweak about:config is enough.
    – Sam
    Feb 1, 2017 at 15:39
  • 2
    same to chrome, just tweaking chrome://flags/ But using extensions is easier for a person who couldn't find these settings by himself. Feb 1, 2017 at 15:42
  • 3
    @IporSircer - You should provide that information, within the body of your answer, for those not able to use extensions. Saying it's possible in a comment, and not explaining which flag, means people not familar with the name of the flag have to spend time to researching it.
    – Ramhound
    Feb 1, 2017 at 15:51
  • 1
    @IporSircer, you can't use chrome://flags/, source: superuser.com/questions/1055741/…
    – pulsejet
    Feb 1, 2017 at 16:32
  • uBlock Origin is also able to prevent WebRTC leaking, if you guys already have it installed Feb 5, 2017 at 17:26

On chrome, if I go into incognito browsing mode the WebRTC extensions meant to block your local IP address don't work. They only work if you are not in incognito mode. So you have to chose, logging to your browser history but no local IP leak or incognito mode with local IP leak.

  • Extensions have a checkbox letting you have them run in incognito mode. You probably just need to check that box for them.
    – Venryx
    Sep 16, 2019 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.