Personal computing discussed

Moderators: renee, Steel, notfred

 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

How does Google (desktop) infer location?

Fri May 31, 2019 10:41 am

Google Search on desktop usually shows a surprisingly close location estimation.
The page footer claims it's "From your Internet address", which is a lie. IP databases show the location at the ISP's HQ, not here.

I don't allow browsers to report location, nor do I have GPS. I don't think JavaScript can report nearby SSIDs? (Yet?). I find it troubling.
 
derFunkenstein
Gerbil God
Posts: 25427
Joined: Fri Feb 21, 2003 9:13 pm
Location: Comin' to you directly from the Mothership

Re: How does Google (desktop) infer location?

Fri May 31, 2019 10:44 am

On my desktop (which does not have Wi-Fi), Chrome routinely puts me in Urbana, IL, which is probably inferred from the hostname. Urbana is in the name, but my ISP is headquartered in Peoria.

On my wife's Chromebook, it knows the correct city. My guess is that it's using some Wi-Fi location if the device has an adapter.
I do not understand what I do. For what I want to do I do not do, but what I hate I do.
Twittering away the day at @TVsBen
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 10:54 am

I don't use Chrome, so any special spying abilities shouldn't be in effect. I do use Vivaldi occasionally, but I think, hope, that it's not as intimate with Google as Chrome, or even Chromium.

I replace my public IP address occasionally, so whatever Google is doing it can't be based on long activity history. It's also not claiming the location is "Based on your search history" (or whatever they call it).
 
Krogoth
Emperor Gerbilius I
Posts: 6049
Joined: Tue Apr 15, 2003 3:20 pm
Location: somewhere on Core Prime
Contact:

Re: How does Google (desktop) infer location?

Fri May 31, 2019 10:55 am

It is entirely from Reverse DNS look-up and they get a best-fit from your local ISP's cable plant/CO.
Gigabyte X670 AORUS-ELITE AX, Raphael 7950X, 2x16GiB of G.Skill TRIDENT DDR5-5600, Sapphire RX 6900XT, Seasonic GX-850 and Fractal Define 7 (W)
Ivy Bridge 3570K, 2x4GiB of G.Skill RIPSAW DDR3-1600, Gigabyte Z77X-UD3H, Corsair CX-750M V2, and PC-7B
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 11:17 am

There's no rDNS for my current IP. When there is, any location names are around the ISP's HQ, not my location. So no extra information there beyond static IP-location databases.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 11:18 am

Your ISP probably has a local NOC which routes the subnet your current IP address is coming from. I am pretty sure geolocation data can have finer granularity than the registration info for the IP block.

FWIW if I look my IP up at iplocation.net, I get either my home town, the next town over, or the nearest large city, depending on whether I give it my IPv4 or my IPv6, and whether I give it my current IP (as of today), or one that my ISP had assigned me a few weeks (or months) ago.

How close is "surprisingly close"?
Nostalgia isn't what it used to be.
 
Wirko
Gerbil Team Leader
Posts: 296
Joined: Fri Jun 15, 2007 4:38 am
Location: Central Europe

Re: How does Google (desktop) infer location?

Fri May 31, 2019 11:24 am

I connect to my home wi-fi network with my Android phone or tablet and sometimes forget to turn GPS off on one or the other. For Google, that's more than enough. The desktop browser shows me my exact location and it makes no difference if it's FF or Chrome.

Edit: Ironically, the location is *less* exact in Chrome on my phone - at least if I turn off Wi-fi and location and turn on mobile data.
Last edited by Wirko on Fri May 31, 2019 11:29 am, edited 1 time in total.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 11:29 am

Wirko wrote:
I connect to my home wi-fi network with my Android phone or tablet and sometimes forget to turn GPS off on one or the other. For Google, that's more than enough. The desktop browser shows me my exact location and it makes no difference if it's FF or Chrome.

^ Ahh, yes. This! ^

If anyone ever accesses Google over your ISP connection from a GPS-enabled device, Google has enough data to guess the likely location of the IP to within a few tens of meters.
Nostalgia isn't what it used to be.
 
Wirko
Gerbil Team Leader
Posts: 296
Joined: Fri Jun 15, 2007 4:38 am
Location: Central Europe

Re: How does Google (desktop) infer location?

Fri May 31, 2019 11:36 am

That's right. Anyone, ever. At least until the public IP changes (and even then, you'd need to change your SSID the same moment, hah).
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 11:43 am

just brew it! wrote:
How close is "surprisingly close"?

Technically off, but still just a few kilometers away.
Any accessible finer-than-IP-block databases you know of?

Wirko wrote:
phone or tablet and sometimes forget to turn GPS off

Mobile devices here rarely use WiFi, and I'm pretty sure not since the last WAN IP change.

(GPS is off by default but I'm assuming nearby WiFi spots are enough; any easy way to query Google for info based on an AP's MAC address, or to request deletion?)
 
Captain Ned
Global Moderator
Posts: 28704
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Re: How does Google (desktop) infer location?

Fri May 31, 2019 12:12 pm

Until and unless the US passes, litigates, and enforces a nationwide privacy standard similar to the European GDPR, you'll not be able to avoid Google somehow pinpointing your location short of going completely offline.
What we have today is way too much pluribus and not enough unum.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: How does Google (desktop) infer location?

Fri May 31, 2019 12:32 pm

meerkt wrote:
Technically off, but still just a few kilometers away.
Any accessible finer-than-IP-block databases you know of?


A "few" kilometers isn't really close, though.

It means it isn't the wifi+gps device "google REMEMBERS" trick, sure, but that exclusion just puts it right in the lap of what JBI suggests.

I have Verizon FIOS. Verizon is headquartered in NYC, but the next hop from me to anywhere blatantly has "PIT" in the name.

So, depending on who you ask and when, it can be "kilometers" close for me too, and when it isn't, it's in the rough vicinity, (another nearby town), just like JBI said.

It is as simple as that.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:00 pm

meerkt wrote:
just brew it! wrote:
How close is "surprisingly close"?

Technically off, but still just a few kilometers away.
Any accessible finer-than-IP-block databases you know of?

Wirko wrote:
phone or tablet and sometimes forget to turn GPS off

Mobile devices here rarely use WiFi, and I'm pretty sure not since the last WAN IP change.

(GPS is off by default but I'm assuming nearby WiFi spots are enough; any easy way to query Google for info based on an AP's MAC address, or to request deletion?)

Even if nobody else in your household ever uses the WiFi with GPS enabled, if you are using a major ISP you almost certainly have neighbors who are being assigned addresses in the same subnet. Given this, Google can infer your IP's likely location anyway.

Given that it is "a few kilometers away", it is probably the location of the local NOC, or the nominal "center" of the town you live in.

I don't think there is much you can do about it without some additional effort and/or spending some cash... setting up a network proxy through a server that isn't located in your area would be one way to mask your location. This comes with its own minor irritations; some sites will block you from accessing them if they think you are using a proxy, for example.
Nostalgia isn't what it used to be.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:12 pm

I do wonder how it works, regardless of avoiding it.

The hostnames of the first few hops to Google imply locations that are >100 km away, the closest (later hop) is still some 50 km. IP geo data for the above IPs gives about 80 km. Also, the detected location is very unlikely to be a NOC.

Neighbors, that's an interesting idea. Let's check the size of the IP block...

Perhaps despite what they state, it is based on some unknown non-IP hints.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:15 pm

meerkt wrote:
I do wonder how it works, regardless of avoiding it.

The hostnames of the first few hops to Google imply locations that are >100 km away, the closest (later hop) is still some 50 km. IP geo data for the above IPs gives about 80 km. Also, the detected location is very unlikely to be a NOC.

Neighbors, that's an interesting idea. Let's check the size of the IP block...

Perhaps despite what they state, it is based on some unknown non-IP hints.

They can still claim it is "IP-based" if they are doing it by correlating your IP with similar IPs from your neighbors!
Nostalgia isn't what it used to be.
 
Goty
Gerbil
Posts: 31
Joined: Wed Mar 04, 2009 7:41 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:21 pm

Google also knows the approximate location (to within a few hundred feet, likely) of your home network from the vehicle-based wifi scans they perform. This actually caused me a small annoyance after a recent move; if I'm connected to my home wifi when I open Google Maps, it will frequently show me at my old house (close to 50 miles away) until it negotiates my actual current position.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:22 pm

JBI wrote:
They can still claim it is "IP-based" if they are doing it by correlating your IP with similar IPs from your neighbors!


That just makes me wonder if what "google (desktop)" says is roughly same as the generic geolocation databases.

Like, if "Google" is within a few kilometers, and the generic services are all over the map, that'd tell us something too.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:34 pm

just brew it! wrote:
They can still claim it is "IP-based" if they are doing it by correlating your IP with similar IPs from your neighbors!

Yep.

I'm not sure how to interpret ASN IP ranges. Can they overlap?
My current IP is supposedly /23, but there also appears to be a /15 with the same prefix.

Doing anything with the above requires two assumptions:
1. That the ISP hands out IP ranges based on geographical areas. Any reason to assume that?
2. That Google figured out the ISP's system. They'd have to keep historical data for every IP to correlate things. Likelihood: between "very likely" and "absolutely certain".

I'll keep an eye out the next time I'm on a different range.

Goty wrote:
Google also knows the approximate location (to within a few hundred feet, likely) of your home network from the vehicle-based wifi scans
Yeah, it was mentioned earlier. But that shouldn't be available in this case.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:45 pm

meerkt wrote:
just brew it! wrote:
They can still claim it is "IP-based" if they are doing it by correlating your IP with similar IPs from your neighbors!

Yep.

I'm not sure how to interpret ASN IP ranges. Can they overlap?
My current IP is supposedly /23, but there also appears to be a /15 with the same prefix.

Doing anything with the above requires two assumptions:
1. That the ISP hands out IP ranges based on geographical areas. Any reason to assume that?
2. That Google figured out the ISP's system. They'd have to keep historical data for every IP to correlate things. Likelihood: between "very likely" and "absolutely certain".

I'll keep an eye out the next time I'm on a different range.

Because of the way routing works, it is not unusual for IPs in the same subnet to be physically "close" to each other. It is also common to take a large subnet and carve it up into smaller ones as you get closer to the "edge" of the network.
Nostalgia isn't what it used to be.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:53 pm

But these are public addresses. Considering the scarcity of IPv4, they probably can't waste IPs by allocating a range per region.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: How does Google (desktop) infer location?

Fri May 31, 2019 1:55 pm

meerkt wrote:
I'm not sure how to interpret ASN IP ranges. Can they overlap?
My current IP is supposedly /23, but there also appears to be a /15 with the same prefix.


The AS number my address is under has 42 million addresses in it. This whole avenue of exploration is a red herring, it isn't used for anything other than the absolute worst case assuming any geolocation service seriously considers it at all.

meerkt wrote:
Doing anything with the above requires two assumptions:
1. That the ISP hands out IP ranges based on geographical areas. Any reason to assume that?


Verizon FIOS, one of the biggest ISPs in the country, does this for a fact, because I use them, and my current IP at home has a DNS entry that starts with "pool" and then literally has the name of a state and city in it.

Generally speaking, this therefore isn't too much of a mystery. And, if your ISP doesn't have any such entry with obvious location-related text, they're still operating in much the same way and therefore it isn't tremendously complicated for an outsider to infer the same information even when it isn't explicit.

meerkt wrote:
2. That Google figured out the ISP's system. They'd have to keep historical data for every IP to correlate things. Likelihood: between "very likely" and "absolutely certain".


google is basically "the" internet company. They're actually one of the pioneers at revamping and modernizing it: kernel-bound TCP to userland QUIC, for instance.

Hence, yeah, I mean, they sort of understand the whole IP and routing thing. It's not a ...challenge, exactly?

meerkt wrote:
Yeah, it was mentioned earlier. But that shouldn't be available in this case.


Well, maybe, but if your neighbor has wifi and the same ISP, I mean, narrowing it down to a few kilometers seems kinda trivial?

---

The biggest question for me is if Google has a much better idea than the generic geolocation databases. If they do, it might be something like your neighbor's wifi. If they don't, then it's probably just the regular IP thing.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 2:03 pm

meerkt wrote:
But these are public addresses. Considering the scarcity of IPv4, they probably can't waste IPs by allocating a range per region.

As long as everyone in a subnet is using DHCP, there's nothing preventing them from swapping subnets around as the number of subscribers in a particular area changes. In fact, when I look my IPv4 address up on iplocation.net, it typically returns 2 or 3 results, based on different geolocation databases. The first one is usually current, and the rest are sometimes elsewhere (in another part of the country). I assume this is because not all of the geolocation databases update at the same time when the public IP subnet "map" changes.

You keep coming up with reasons you think this should be impossible, but none of the reasons hold water. For a company with the scale, reach, and data gathering capacity of Google, it isn't even difficult; it borders on trivial.
Nostalgia isn't what it used to be.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 2:04 pm

Glorious wrote:
The AS number my address is under has 42 million addresses in it.

I don't mean the whole ASN. Just the specific block my IP is in, one of many assigned to the same ASN.

Verizon FIOS, one of the biggest ISPs in the country, does this for a fact

They may be able to afford it because they're big and have a whole lot of spares from times before IPv4 depletion.

The biggest question for me is if Google has a much better idea than the generic geolocation databases.

They do, at least versus the common IP databases I encountered. See above for what databases show as the location of my IP, and of hops along the way.


just brew it! wrote:
As long as everyone in a subnet is using DHCP, there's nothing preventing them from swapping subnets around as the number of subscribers in a particular area changes.

But then there's no range-to-location correlation. Or at least not as strong.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 2:09 pm

meerkt wrote:
just brew it! wrote:
As long as everyone in a subnet is using DHCP, there's nothing preventing them from swapping subnets around as the number of subscribers in a particular area changes.

But then there's no range-to-location correlation. Or at least not as strong.

It shouldn't take long for them to figure out the subnet moved, based on people using that subnet via mobile devices who leave GPS enabled. For larger subnets with lots of users, it would probably take just a few minutes.

"Hey, 50% of the WiFi traffic on this subnet is suddenly coming from devices which report they are in Salt Lake City, and none of it is coming from Newark any more..."
Nostalgia isn't what it used to be.
 
Glorious
Gerbilus Supremus
Posts: 12343
Joined: Tue Aug 27, 2002 6:35 pm

Re: How does Google (desktop) infer location?

Fri May 31, 2019 2:20 pm

meerkt wrote:
I don't mean the whole ASN. Just the specific block my IP is in, one of many assigned to the same ASN.


Again, I'm unsure what you are getting at.

What I am saying is that even paying attention to that is a red herring: it's not useful, not unless the alternative is like throwing a dart at the globe and trying to guess what hemisphere you are in.

meerkt wrote:
They may be able to afford it because they're big and have a whole lot of spares from times before IPv4 depletion.


Once again, unsure...

I mean, even if routing tables had 4 billion COMPLETE entries in them (that is, any arbitrary IP could be interchangeable with literally any other arbitrary IP---which is not how this works) we're still left with how Verizon is voluntarily associating, in direct and immediately humanly readable form, geolocation anyway.

Yes, maybe you don't have Verizon. Yes, maybe your ISP doesn't do that. But mere fact that Verizon does SHOULD demystify much of the magic for you, right?

Especially since, if it -IS- a much smaller ISP, they probably aren't flipping this stuff around as much. With Verizon sometimes it's hundreds of kilometers with me, just like JBI (whatever his ISP is). Sometime it is not and is "kilometers" away.

meerkt wrote:
They do, at least versus the common IP databases I encountered. See above for what databases show as the location of my IP, and of hops along the way.


OK, well then this likely doesn't have much to with any wifi tricks and rather is just IP inference.

---
EDIT: ACK! I wrongly inverted the above, you meant that google DOES have a better idea. OK, so it's almost certainly them leveraging the wifi+GPS stuff of your neighbors+same ISP.

So, this amplifies what I said below: there really isn't much mystery left.
---

Without knowing a lot more about your situation specifically (what ISP? Are you in the middle of nowhere, or within "a few kilometers" of geographic locus? Hey what -is- your IP, etc...) where's the mystery?

JBI wrote:
"Hey, 50% of the WiFi traffic on this subnet is suddenly coming from devices which report they are in Salt Lake City, and none of it is coming from Newark any more..."


Or, if they don't have that cause they're not google (et al), other information like from ad-servers or cookies or who knows what. You can get a decent idea, and most of the time they indeed have a decent idea.

<shrug>
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 2:34 pm

Bottom line: If you're in a densely populated metro area, it would not surprise me if a simple IP geolocation lookup could get you "within a few km". Achieving higher accuracy than that, or locating to within a few km in a rural area might require additional tricks, but certainly still within the capabilities of a company with the sort of resources Google has.
Nostalgia isn't what it used to be.
 
jihadjoe
Gerbil Elite
Posts: 835
Joined: Mon Dec 06, 2010 11:34 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 3:18 pm

I have an old PC with no wifi whatsoever and even in incognito mode Chrome is surprisingly accurate with the location. Totally convinced Google has the most accurate geolocation database ever that they're (hopefully) only keeping for themselves.

Entering 'current location' into Google Maps is far more accurate than any other ip location service I've tried.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: How does Google (desktop) infer location?

Fri May 31, 2019 3:25 pm

just brew it! wrote:
It shouldn't take long for them to figure out the subnet moved

Are power-of-2 chunks are enough resolution for ISPs to avoid waste? I suppose they might be. Or when they must, they can hand out IPs more haphazardly at the cost of losing some processing efficiency.

Glorious wrote:
Again, I'm unsure what you are getting at.

I was considering a IANA IP block a unit that an AS/ISP can decide to "assign" to a region. There's a difference between all ranges an ASN has, and one specific small range. On second thought, ISPs can subdivide ranges however they see fit, so IANA blocks shouldn't matter.

maybe you don't have Verizon. Yes, maybe your ISP doesn't do that. But mere fact that Verizon does SHOULD demystify much of the magic

My ISP's geo hostnames are not precise at all, unlike Verizon, so that's not what Google uses here. They won't be getting city and town names from that. Assuming JBI's idea of different-sized subnets shifting around based on customer counts per region, I do wonder if hostnames can change as dynamically. Big ISPs are under less IP space pressure, so maybe in a better position to have their range allocations more static, and so more likely to have more precise geo hostnames. I could be wrong.

Are you in the middle of nowhere, or within "a few kilometers" of geographic locus?

It's not quite the big city, but hardly the boonies. There are enough people to feed Google with yummy data.
Big data can be fun, at least when you're not on the receiving end.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How does Google (desktop) infer location?

Fri May 31, 2019 4:05 pm

meerkt wrote:
On second thought, ISPs can subdivide ranges however they see fit, so IANA blocks shouldn't matter.

Yup. IANA blocks only matter in terms of who "owns" the top level subnet. Within that, they can do whatever they want.
Nostalgia isn't what it used to be.
 
DPete27
Grand Gerbil Poohbah
Posts: 3776
Joined: Wed Jan 26, 2011 12:50 pm
Location: Wisconsin, USA

Re: How does Google (desktop) infer location?

Fri May 31, 2019 4:08 pm

If you're logged in to chrome with your gmail account on a desktop/laptop, I wouldn't be surprised if they're pinging your cell phone's location via Chrome/Gmail to deduce your location also.

Not to mention your "Google Profile" which Google saves your searches and such. Looking for a place to eat/shop/visit/etc in your town via Google with relative consistency? They can infer that you live there.

Side Rant - I love how everyone got so worked up with Windows10's "spying" features, even though Microsoft was being comparatively transparent about the data they were collecting, and yet nearly every cell phone user has had more data mined from them via their phone manufacturer/ OS / carrier than Windows would ever manage to gather WITHOUT you using the relatively simple means of turning off those services.
Main: i5-3570K, ASRock Z77 Pro4-M, MSI RX480 8G, 500GB Crucial BX100, 2 TB Samsung EcoGreen F4, 16GB 1600MHz G.Skill @1.25V, EVGA 550-G2, Silverstone PS07B
HTPC: A8-5600K, MSI FM2-A75IA-E53, 4TB Seagate SSHD, 8GB 1866MHz G.Skill, Crosley D-25 Case Mod

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On