How does Google Maps know where I am, when I'm using a VPN?
How does Google Maps determine my location?
I've gotten some understanding of Google Maps' geolocation methods from here: http://friendlybit.com/js/geolocation-and-google-maps/
In the newer browsers (all but IE6, IE7, or IE8) may ask you for your positioning information from the browser. It usually shows up as a bar at the top of the browser. The browser then gathers two specific forms of positioning information from your computer: your IP address and the signal strength of any wireless network near you. That information is then sent, if you approve it, to Google, which returns the coordinates you are at the moment.
If your wireless reciever is turned off, or you’re at a stationary computer, all calculations are based on the IP number. These kind of lookups are quite arbitrary and inaccurate, I just get to the nearest big city when trying to use it over a non-wireless line. But mobile connections are slowly taking over landlines, so I guess this problem will solve itself automatically.
According to this article, Google only uses my IP address if I am using a desktop. However, when I use a VPN to go online (and I can confirm that another IP geolocation service shows me as being on another continent), Google Maps is still able to accurately show my location. How does this work?
change your router.. google obtained the mac of your router, when making google maps. I changed my router after it died, and I no longer appear.
Also if you are on IPv6 most likely the VPN service will not cover all your traffics. It happened to me with ipvanish. Google stopped to see my real location only when I turned off IPv6 on my browser. Read also: http://blog.dave.io/2011/06/vpn-ipv6-privacy/
If you consent, Firefox gathers information about nearby wireless access points and your computer’s IP address. Then Firefox sends this information to the default geolocation service provider...
Firefox knows the IP address, which is used to connect to the VPN provider. Many geolocation services, however, only look at the IP address they see from the server side.
By the way: With java installed, a website can read the local ip-address without asking for permission.
new Socket("http://example.com", 80)).getLocalAddress().getHostAddress()
example.com needs to be replaced with the name website to obey the same origin policy.
I suspect this has less to do with "your computer's IP address" and more to do with nearby wireless access points (that Google has an inventory of). My local machine's IP address is of no use unless I'm using a public IP address. If I'm using any RFC1918 address, and I'm tunneling my traffic through a VPN then IP address is not the information giving up my location.
I also suspect, google being google, they could be using a number of heuristics to 'guess' location. I have noticed google reporting incorrect location information when using a desktop with a wired connection. I'm in a rural location and google will often report me as being in the nearest large metropolitan location. My guess is that if you live in a major city, google's guesswork/voodoo will frequently be correct, but if your in a regional/remote locaiton, more often than not, it will be incorrect unless your using a device with geo-loc facilities.
I edited out the second half of your answer because it is no longer correct. First, Java applets have to be manually enabled. Second, by default, Java requires permission to be ran in the browser. You can of course grant such permission indefinitely; however, I can only conceive a negligible number of scenarios in which one who would use a VPN would do that. Third, applets are very rare nowadays. The decline in prevalence will only continue. Fourth, it does not answer the question since this question is specifically about Google's practices. Google Maps has never employed applets.
One possibility is that modern browsers support a feature called the Geolocation API which states the following:
Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. No guarantee is given that the API returns the device's actual location.
Warning: Google maybe using other voodoo to determine your location, after all this is Google...
+1 if only for the "other voodoo" comment. I'm always fairly amazed at how Google is able to accurately predict or otherwise derive information (i.e.: search auto-completion) which I have not yet given it.
I just noticed that, aside from the "Google voodoo" comment, this answer doesn't *really* address the situation posed in the question. The user suggests that the *only* geolocation-relevant information he expects is available from his computer, is his IP address. Since it's a desktop, he probably doesn't have a GPS or Wi-Fi adapter. Bluetooth isn't entirely unlikely, but I'm not sure it can be presumed. (And, with Bluetooth's relatively short range and wide mobility, does Google *really* have enough information to correlate that? This is the first I've heard of it.)
@IsziRoryorIsznti No voodoo. The browser knows the local ip and reports that to the geolocation service, if permission is granted.
Alternative to clearing cookies/cache: Run in Private/Incognito/Whatever-Your-Browser-Calls-it Mode. Or, load up a freshly built VM with your VPN software and try from there.
I have NoScript installed, cleared all the cache, cookies and everything. But I need to turn off NoScipt in order to get google maps to work properly. What I am trying to understand is that, I am connected to a VPN and I expect to see the location of the VPN server in google maps
Do you have Google maps on your cell phone? was that phone with you?
I am pretty sure that if you log into Google on your PC via VPN, but yout phone tells Google where you are they correlate the two and take the Phone's GPS location as being more trustworthy than the Geolocation on the IP address of your browser.
This is correct. If you have location history enabled, Google will sometimes use GPS data from your phone to more accurately determine your location. Obviously, it can do this without using your browser's Geolocation API. If you hover over the location icon in the UI and get a tooltip that says "From your phone (Location History)", then that means Google is using this method. (More info: https://support.google.com/maps/answer/3093609?hl=en)
When you are using a VPN your routing table gets modified and added the networks for which you can access. Perhaps I misread your question, but according to my understanding from your question - You are routed to Google through your internet connection and not the VPN. Unless you are going to Google from a terminal server through your VPN, which renders my answer invalid.
He is connected to a VPN and thus all traffic is suppose to go through the VPN. My guess there is a combination of factors for instance Google is able to get his actually end point.
I believe you are making a mistake here, my friend. If I am connecting to my organization from home with, let's say a Checkpoint VPN client, upon connecting, my routing table is modified and all of the traffic directed to the "new routes" in my routing table is tunneled to the organization firewall. If I did not get routes to Google, then I will go through the internet. This is mainly the idea of what's called a "VPN Domain" or "Encryption Domain". Please correct me if I am wrong, always happy to learn new things :)
@Ramhound, I am thinking exactly the same thing. I am sending all traffic over VPN connection.
In my job, many times I encounter the scenario of a remote access user connecting from home to his office with a VPN connection, and for some reason the user can't access a certain resource on the office network. We then find out that the required resource is not a part of the VPN domain for this user, and hence he tries to access it from his internet connection, and not through the VPN. a simple trace command can show you that. Hope I made myself clear. I repeat - This answer is only valid in case you are not accessing Google through an office resource over the VPN (terminal server etc.)
@user10732: The term here is "split tunneling": http://en.wikipedia.org/wiki/Split_tunneling
From Google's support pages:
How Maps gets location info
When you click Location on your computer, Maps uses different sources to try to get an accurate read on your location. This info might come from:
- Your computer's web browser location info
- Your phone's location, if you are a Location History user
To elaborate on that a bit, "your computer's web browser location info" refers to a feature available in modern browsers that lets websites request permission to access your location through your web browser.
If you approve that request, your browser will do the best it can to provide accurate location information to the website. This will include GPS data in the case of websites on a mobile device, location information inferred from the presence of nearby wireless networks in the case of a laptop or desktop with a WiFi or 4G card, and simple IP information as a last resort.
Note that this is your browser which is determining your location, not the website. Therefore, the browser might use your real IP address to determine your location, even if the website you're visiting doesn't know what that IP is.
The second point, "your phone's location, if you are a Location History user" refers to a feature of multiple Google services which tracks your location using data from multiple different devices. From Google's support page on managing your location history:
Your location history allows Google to show you useful information based on where you’ve been with the devices that you’re signed in to with your Google Account. For example, you’ll see predictions for your frequent commutes and better search results. Your location info can also be used by any Google app or service, including the ads you see.
So basically, if you're signed in, Google Maps on your computer could potentially decide to use GPS data from your phone to determine where you are. Google doesn't need any special permissions from your browser for this, since it's getting this information from your phone, not your browser.
You can determine when Google Maps is using data from your phone by hovering your mouse over the GPS icon in the bottom right corner of Maps:
If you want to ensure that your location isn't passed by the browser and your using firefox then its quite simple to disable it you just do
- In the URL bar, type about:config
- Type geo.enabled
- Double click on the geo.enabled preference
- Location-Aware Browsing is now disabled
Check the site http://simplesniff.com/ from the proxy. Under the
Your HTTP headers from the current request are:section, look for these two values:
X-REAL-IP: 184.108.40.206 X-FORWARDED-FOR: 220.127.116.11
One will be your proxy IP, the other will be your "real" IP address, which the proxy is leaking. Most popular proxies, such as Squid, can be configured not to leak.
Simply using a VPN service doesn't hide your true identity or your location. There are many ways to be identified and tracked, and trying to plug all of the leaks is pointless.
Instead, just use a different VM for each new identity and location, and always connect it to the Internet using the appropriate mix of VPNs and Tor. Also avoid cross contamination through browsing, accounts, interests and so on.