Live data from Hacker News

Tell HN: Google Maps location data is used for GeoIP updates

news.ycombinator.com

1–10 of 68 posts

Tell HN: Google Maps location data is used for GeoIP updates

#1
Hi,

I've been meaning to write this for a few years now. I saw https://news.ycombinator.com/item?id=34032484 and lots of great replies there - but I happen to have an insight which I kept track of for years now.

Some background first. Since more than a decade I've been using an always-on VPN on all my devices through a VPS I operate (various cloud providers along the years). Also for context, I stopped using all google services around 2015 or thereabouts - although I still have an account I no longer use it. The only google service that I use rarely is google maps - of course, never logged on. And a few times a month I use google search for the odd obscure thing.

Around 2016 was the first time I noticed that google.com was showing at the bottom of the page my ZIP code. It felt very unusual but I was in the process of moving so I didn't pay too much attention. To my surprise, a few weeks later google.com was showing my new ZIP code.

I shopped around for cloud providers that would allow me to rotate the instance IP easily and thankfully there are many but I was curious how come google picked it up - the only plausible reason was using location data from the Google Maps iOS app.

Here's how you can replicate this.

Get a cheap VPS from a country different than yours. Get an iOS device (ideally an (older?) iPhone but I think it should work on an iPad) - Android devices should be excluded from this test for obvious reasons. Reset it to factory defaults (optional but removes moving parts and false leads like cookies etc).

Install wireguard (or your preferred always-on vpn) and configure the VPS to be used as an exit node. Install google maps (don't login of course) - can be used without being logged on just fine. Install firefox focus (Safari in Private Window mode would work as well).

Confirm via ipinfo (or your preferred whatsmyip website) that you're using the VPS IP Go to google.com and confirm it's showing at the bottom of the page the country of the VPS (could also be shown in a different language if google has a presence in that country).

Use the google maps app a few times a day (ideally navigate from a place to another) - it will take about 2-3 weeks but you'll notice that google.com will now show your actual country for the VPS IP and also the google.com language will change to your own.

If you want to take it one step further, continue to use google maps on the iOS device. You'll notice that after a few more weeks, google.com will show your actual City (based on the IP) - and after a while longer it will be even more precise, will show your ZIP code.

You have to be patient though, it will take 2-4 weeks to start with - and it's imperative that that IP address is dedicated to this test.

Funny enough, I was on holiday on Mexico for a month right before reading the HN article I mentioned (have been using a VPS in the states for lower latency) and I noticed that after 2 weeks the language changed to Spanish and google.com was showing Mexico (I rotated the IP when this happened and it prompted me to write this 'Tell HN'.

Not surprisingly but Google doesn't share the new GeoIP data - MaxMind, ipinfo and others never changed their location data for that IP - they showed the original geoip even a few weeks after google changed theirs - haven't checked longer than that - it could be shared eventually.

In conclusion - I can't say that I'm surprised Google is using the Maps location data - and I don't think there's any way to prevent it (outside of not running Maps - but unfortunately it's one of the few ways of checking restaurant reviews). My "workaround" is to periodically rotate my VPS IP and move on with life :)

Thanks for reading - I hope you found this useful.

Re: Tell HN: Google Maps location data is used for GeoIP updates

#4
post #2

Is this definitely based on GeoIP, or could it possibly be that when you look at the same city on Google Maps every day, it decides that you are likely to want to look at that city? Does the behaviour persist in a private browsing window?

I always use private browsing window (and note my recommendation on how to replicate - to use Firefox Focus as this does not have any persistent data) - so yes.

It's definitely updated on GeoIP as it's device independent (eg: a laptop using the same exit IP will automatically be redirected to that country when it changes).

Re: Tell HN: Google Maps location data is used for GeoIP updates

#5
post #3

Tldr: Google associates your static IP to your real location, if you use Google Maps long enough with that IP. My Takeaway: use a shared IP

It would be an interesting test if someone has the time and resources - use conflicting location for the same IP. Could be done in an emulator in Android Studio I assume? I would think that it would simply treat it as bad (inconclusive) data and not update the GeoIP.

Re: Tell HN: Google Maps location data is used for GeoIP updates

#8
Of course they do, was there ever any doubt?

Next important step: How can this be used for something entertaining? Does google maps work with forged location data? That would allow to seed the system with an IP that lives in area 51, or something like that.

Re: Tell HN: Google Maps location data is used for GeoIP updates

#9
You say that the VPN is always on, but wasn't there a post on HN some time ago that showed that on iOS VPN is not 100% used for all data? Might have been this one: https://www.michaelhorowitz.com/VPNs.on.iOS.are.scam.php

So potentially your real IP was leaked otherwise, Google became aware of that IP and geolocated you, without Maps data?

Re: Tell HN: Google Maps location data is used for GeoIP updates

#10
I have a wiregaurd VPN in my home server in London. During the pandemic I was stuck in the Middle East for a few months. Obviously while there I was VPN-ing all my traffic from my various devices through my home server. When I got back to London, all my YouTube and TV ads were as if I was still in the middle east. Very annoying.
Post reply on HN