0

I have tried using WebRTC to find private client IP address using Javascript by following the below link and I am successful in Chrome and Firefox but it didn't work in Microsoft Edge.

https://ourcodeworld.com/articles/read/257/how-to-get-the-client-ip-address-with-javascript-only

All the third solutions gives only public IP address. Tried the answer from the below link as well.

How to get client's IP address using JavaScript?

How to get private Client IP address in Microsoft Edge browser using Javascript?

Do we have any other alternate for WebRTC to get private IP address in Edge browser?

Easwaramoorthy Kanagaraj
  • 3,925
  • 8
  • 36
  • 62
  • Because I need private IP address, not the public one. Is there a way to retrieve private IP address via server? @Teemu – Easwaramoorthy Kanagaraj Dec 09 '19 at 07:31
  • Check out this [question](https://stackoverflow.com/questions/20194722/can-you-get-a-users-local-lan-ip-address-via-javascript). I think it addresses the same WebRTC issue. – AngryHacker Dec 09 '19 at 08:20

1 Answers1

0

According to Browser Compatibility section of RTCPeerConnection, CreateDataChannel is not supported in Edge, therefore it won't work in Edge.

Also it is not recommended to leverage the WebRTC to expose the private IP address because:

The addresses exposed in candidates gathered via ICE and made visibile to the application in RTCIceCandidate instances can reveal more information about the device and the user (e.g. location, local network topology) than the user might have expected in a non-WebRTC enabled browser. ...

Referring to Address of WebRTC Standard.

Elvis Xia - MSFT
  • 10,801
  • 1
  • 13
  • 24