natevw / ipcalf

Gives back your public IP address in plain HTML, plain text, and JSON (w/CORS!)
http://ipcalf.com
72 stars 12 forks source link

Network IP fails in Google Chrome #2

Open codingstill opened 5 years ago

codingstill commented 5 years ago

Visiting https://net.ipcalf.com/ in Google Chrome returns a guid-like value instead of the actual IP. For example

Your network IP is: 5811584f-3480-4te0-875f-60a1c8f4393c.local Make the locals proud.

Chrome version: Version 75.0.3770.100 (Official Build) (64-bit)

From what I've seen so far, in the candidate string of the RTCIceCandidate object, this guid-like appears where the actual IP used to be.

Is there a way to retrieve the actual client IP in Chrome?

Edit: This behavior is not consistent. For some users with the same Chrome version are able to get the actual client IP

SathishKumar140 commented 5 years ago

I also used to face this issue, it seems like chrome is doing an experimental to expose actual ip

image if #enable-webrtc-hide-local-ips-with-mdns flag is enabled you will get to see only mDNS (Multicast domain name) in web page

I am also looking for the solution, please help

codingstill commented 5 years ago

Hi @SathishKumar140

Thanks for posting. Indeed, setting this feature to Disabled it resolves the issue. The option is in chrome://flags/#disable-webrtc for anyone that might ask.

Closing this as it is not related to ipcalf.

SathishKumar140 commented 5 years ago

If chrome make's this experimental feature live, then it became a bug and we don't get an option to enable/disable. How can we solve this issue at an early stage?

codingstill commented 5 years ago

I think this is considered a security issue/concern, known as WebRTC leak. I am not sure if this can be addressed from the website's end.

SathishKumar140 commented 5 years ago

Is there any other way to get IP in the client?

natevw commented 5 years ago

Interesting, clever for them to go the mDNS route to hide those.

As an aside, if they actually start letting the user resolve mDNS addresses (e.g. my laptop's mDNS name from my phone) too, then that somewhat reduces the need for knowing the local IP address anyway….

But anyway, I'll re-open this assuming they might go ahead rolling this out and see if there's a way to let the user grant perms anyway.

natevw commented 5 years ago

Via https://github.com/vitalets/webrtc-ips/issues/3#issuecomment-493507388, there's some discussion at https://groups.google.com/forum/#!msg/discuss-webrtc/l0gc3RjBhc0/FsMqOlOSBwAJ and even a draft RFC for the feature: https://tools.ietf.org/html/draft-ietf-rtcweb-mdns-ice-candidates-02

natevw commented 5 years ago

Looks like the current flag for this is chrome://flags/#enable-webrtc-hide-local-ips-with-mdns "Anonymize local IPs exposed by WebRTC." if anyone wants to opt out of the privacy protections here.