News for hackers. Stuff that matters.
Re:Every mountain, building and tree shadow in the world sim... by wesamco on Friday May 31, 2024 @09:34AM (#40534936)
How the heck did it automatically pan the map to my current location, my small town, in an Incognito window, on page load?

Is IP geolocation this accurate and accessible to every website nowadays?

If this website can do this I assume every website I visit can do it too?

Re:Every mountain, building and tree shadow in the world sim... by LeifCarrotson on Friday May 31, 2024 @10:06AM (#40535366)
Geo-IP through Cloudflare:

    <script id="cflocation"> 
        window.CFLocation = {"lat":####,"lng":####};window.CFDsm=null;
    </script>
See https://developers.cloudflare.com/network/ip-geolocation/.

Mine's off by more than 100 miles (Comcast Business fiber), it's not magic.

Re:Every mountain, building and tree shadow in the world sim... by aeyes on Friday May 31, 2024 @11:00AM (#40536067)
Cloudflare only gives you the country
Re:Every mountain, building and tree shadow in the world sim... by lights0123 on Friday May 31, 2024 @11:10AM (#40536191)
Re:Every mountain, building and tree shadow in the world sim... by irrational on Saturday June 01, 2024 @11:23AM (#40546496)
Then how did the website end up just about a mile from my house?
Re:Every mountain, building and tree shadow in the world sim... by tills13 on Friday May 31, 2024 @11:56PM (#40542750)
It's probably either just the lat long of the PoP or some magic based connection latency?
Re:Every mountain, building and tree shadow in the world sim... by ale42 on Friday May 31, 2024 @10:03AM (#40535323)
You should probably try what one of the few online demos of IP geolocation tell about your IP... (just to cite one among many, quality varies a lot across services and geographic zones: https://www.maxmind.com/en/locate-my-ip-address)
Re:Every mountain, building and tree shadow in the world sim... by pavon on Friday May 31, 2024 @12:40PM (#40537260)
Interesting. I have a static IP, and have kept that same IP through multiple moves around the state, but it knows my current zip code. I wonder if that is because my ISP shares the zip code, or through association with data collected from other sites.

And yet every site that uses IP geolocation for useful purposes thinks I'm in a completely different state that bounces around every few months, if I don't let the browser share my location.

Re:Every mountain, building and tree shadow in the world sim... by reincoder on Friday May 31, 2024 @02:22PM (#40538620)
I work for IPinfo.io (feel free to check your location data with us to see if we are correct as well). It is most likely that your ISP is sharing your zip code via a WHOIS/geofeed record.
Re:Every mountain, building and tree shadow in the world sim... by ceinewydd on Friday May 31, 2024 @09:49PM (#40542203)
For me, Firefox and without iCloud Private Relay engaged, Maxmind is within about 2km and doesn't get the city correct (but we're right on a border), and IPinfo is about 15km as the crow flies (and gets the city entirely wrong).
Re:Every mountain, building and tree shadow in the world sim... by reincoder on Saturday June 01, 2024 @10:26AM (#40546026)
That is very unfortunate. If you reach out to support and drop a correction with us, that will be quite helpful.
Re:Every mountain, building and tree shadow in the world sim... by Retric on Friday May 31, 2024 @11:47AM (#40536639)
That’s narrowing things down to a 200km radius for me and while I am within that circle it’s center is over 100km from me.
Re:Every mountain, building and tree shadow in the world sim... by nozzlegear on Friday May 31, 2024 @06:52PM (#40541167)
This makes me glad I have iCloud Private Relay turned on for all of my devices and my wife’s devices. Clicking on this link showed my location as Birmingham, Alabama, more than 1000 miles away from my actual location in northern Iowa. Several of the other IP geolocation sites others have linked in this thread showed places like Chicago (closer), and Dallas (much further).
Re:Every mountain, building and tree shadow in the world sim... by sdenton4 on Saturday June 01, 2024 @04:25AM (#40543902)
Well, the jokes on you: Now we all know that you're in northern Iowa.
Re:Every mountain, building and tree shadow in the world sim... by noduerme on Saturday June 01, 2024 @09:16AM (#40545488)
obviously, that's yet another layer of misdirection. They're probably in Nebraska, laughing at all of us.
Re:Every mountain, building and tree shadow in the world sim... by xp84 on Friday May 31, 2024 @09:40AM (#40535019)
It is very cheap and easy. Even the free versions of the database available from maxmind are plenty accurate for town level.

At my last job, I built a little docker image that used the free maxmind DB and kept it up to date, and ran a node server which returned some JSON telling estimated lat/long, city name, country, etc.

Re:Every mountain, building and tree shadow in the world sim... by regularfry on Friday May 31, 2024 @09:45AM (#40535081)
Cheap, easy, and wrong. It puts me a clear 800km away from where I'm actually sitting, and I'm sitting in a major UK city.

It's put me on the wrong continent before now. That was fun.

Re:Every mountain, building and tree shadow in the world sim... by mynameisvlad on Friday May 31, 2024 @11:46AM (#40536622)
Cheap, easy, and generally correct for the majority of people*

Just because it’s 800km off for your IP does not mean it’s 800km off for every IP and Maxmind is generally considered one of the reliable providers of this information.

Re:Every mountain, building and tree shadow in the world sim... by wesamco on Friday May 31, 2024 @10:07AM (#40535381)
I guess the accuracy really depends on your location or ISP.

I believe my ISP rarely or never rotates IP addresses, and on top of that I think my ISP provided router is assigned an IPv6 address and it prioritizes using it, because when I visit whatismyipaddress.com with JS disabled, it can only show my IPv6 address, but if I enable JS it can show an IPv4 address too (I assume through the WebRTC IP leak method, which requires JS)

Re:Every mountain, building and tree shadow in the world sim... by xp84 on Friday May 31, 2024 @02:56PM (#40538951)
When I built the thing I mentioned, and even if i did so now, I'd just not make an AAAA record for it, because it's still safe to assume ipv4 connectivity exists (and not just via some remote proxy or something), and I think at least the database I had access to was for ipv4.

I don't think they need any hackery to get your IPv4, they just need a separate hostname configured that they can fetch from, which only has an ipv4 (A) record.

Re:Every mountain, building and tree shadow in the world sim... by littlestymaar on Friday May 31, 2024 @10:03AM (#40535315)
> It's put me on the wrong continent before now

What did you expect after leaving Europe? /s

Re:Every mountain, building and tree shadow in the world sim... by reincoder on Friday May 31, 2024 @02:20PM (#40538597)
Where do we locate you? https://ipinfo.io/

If the location data is incorrect, you can always submit a correction with us: https://ipinfo.io/corrections

Re:Every mountain, building and tree shadow in the world sim... by regularfry on Friday May 31, 2024 @04:46PM (#40540049)
Better! Still 200km out, but better!
Re:Every mountain, building and tree shadow in the world sim... by reincoder on Saturday June 01, 2024 @10:29AM (#40546042)
200 KM means there is room for improvement. If you reach out to support and provide a correction, that will be quite helpful. If you mention that you came from HN, I can report back on why we had such a deviation.
Re:Every mountain, building and tree shadow in the world sim... by Moru on Friday May 31, 2024 @05:49PM (#40540672)
Mine was about 600 km wrong but the correct country at least. It's reporting the ISP's location but it's a country wide ISP.
Re:Every mountain, building and tree shadow in the world sim... by reincoder on Saturday June 01, 2024 @10:28AM (#40546032)
If you reach out to support and drop a correction with us, that will be quite helpful. This is an unusually high deviation, so we would like to investigate it.
Re:Every mountain, building and tree shadow in the world sim... by shepherdjerred on Friday May 31, 2024 @11:53AM (#40536705)
That is crazy. Even Google Maps isn't this accurate for me with location turned off.
Re:Every mountain, building and tree shadow in the world sim... by davidmurdoch on Friday May 31, 2024 @09:59AM (#40535273)
I thought the same. It's the first time I've ever seen IP geolocation get my home IP address correct. It usually thinks I'm in North Carolina (I'm in Florida).
Re:Every mountain, building and tree shadow in the world sim... by hoosieree on Friday May 31, 2024 @11:43AM (#40536591)
Same here. But knowing my ISP, it'll change throughout the day, sometimes by quite a lot.
Re:Every mountain, building and tree shadow in the world sim... by moogleii on Friday May 31, 2024 @11:26AM (#40536391)
A VPN should help with that. E.g. for the Mac folks, Private Relay on vs off was a delta of about 100 city blocks for me.
Re:Every mountain, building and tree shadow in the world sim... by mcslambley on Friday May 31, 2024 @09:39AM (#40535010)
I can't speak for this website specifically but Cloudflare makes it pretty easy to geolocate users based on request headers.
Re:Every mountain, building and tree shadow in the world sim... by BurningFrog on Friday May 31, 2024 @10:04AM (#40535341)
FWIW it placed me 10 miles away.

Right city, completely wrong part. Maybe that's where my ISP has their connection?

Re:Every mountain, building and tree shadow in the world sim... by antod on Saturday June 01, 2024 @01:53AM (#40543232)
Mine started in a different city about 520km away. And I wasn't incognito. Probably a lot more to do with your country, your ISP or coincidence than anything else.