Live data from Hacker News

Passive TCP/IP Geo-Location

geoloc.foremski.pl

81–90 of 91 posts

Re: Passive TCP/IP Geo-Location

#81
post #77

Earlier quoted context omitted.

If ping times are over 250ms the user's likely location is China (but could also be online via satellite, or in space). Of course, if the user is in China, Google Maps won't display.

Eh? RTT between London and Sydney for example is around 300ms and testing that page, I see a 316ms RTT from Singapore (in London). Theoretical minimum RTT's based on the speed of light for systems on the opposite side of the world is nice and all but doesn't take into account the realities of packet processing on the internet.

Yes but speaking statistically, since virtually nobody lives in Australia or London versus China, the user's likely location is China.

Re: Passive TCP/IP Geo-Location

#82
post #80

While GeoIP databases might be more accurate this method may in some situations provide location information of users behind proxies. lame self-reference, discussion on the topic: https://deadhacker.com/2011/03/13/predicting-location-of-one...

Sort of. You measure the latency from the user to the proxy + the proxy to the site, so what you end up with is the approximate location of the proxy and a radius around it where the user could be. But the radius is liable to be 3000 miles, and you can't even assume the user isn't really closer to the proxy than that because the user could be using more than one proxy or anything else that adds fixed network latency (including on purpose to prevent this).

Which is the same problem with using it to determine if the user is "too far" from the server. You can get extra latency (and thus false positives) whenever there is bufferbloat or a lame corporate network that routes traffic from New York to New York via a network appliance in California or similar.

Re: Passive TCP/IP Geo-Location

#83
post #48

This is wildly inaccurate. I'm in the U.S. (not even a southern state) and it thinks I'm somewhere well off the coast of Peru. Perhaps my results are atypical, or there's a rendering problem? Perhaps this could be improved with more servers and a better algorithm for resolving the times?

Actually, what it's trying to tell you is that you're not in Peru. If you're 220 ms away from Singapore, you must not be in Columbia, since a speed-of-light transmission would take longer than that to make a round trip. For me, the most specific fix is provided by New York and San Francisco. Together, they can tell that I'm somewhere in the US, Canada, or Mexico. (But, of course, you could have figured that out from…

Ah yes, that makes more sense. Thanks for the help. :)

Re: Passive TCP/IP Geo-Location

#84
post #71
post #69

this puts me in one of about 6 locations in the world each with an accuracy of several thousand kilometers. probably because i suffer from quite unpleasant packet loss. but not convinced it works.

Some of the circles are inverse circles. I thought it was inaccurate at first too, until I realized the India result was telling me "you're NOT in Peru".

Just done it from the office. I'm definitely "not" in the ocean. http://i64.tinypic.com/28ujms7.png

Re: Passive TCP/IP Geo-Location

#85
post #50

I see the bug. If the ping times are high enough (~250ms) it will happily create circles which exceed the area of earth, and the google maps API will happily draw negative circles which exclude the user's likely location. Really there should be a max function that shades the entire earth (or ignores it since that result really can't tell you anything).

If ping times are over 250ms the user's likely location is China (but could also be online via satellite, or in space). Of course, if the user is in China, Google Maps won't display.

Or they're on Comcast with wifi in a large apartment building. I have a 250mS ping, and I'm definitely not in China.

Re: Passive TCP/IP Geo-Location

#86
post #82
post #80

While GeoIP databases might be more accurate this method may in some situations provide location information of users behind proxies. lame self-reference, discussion on the topic: https://deadhacker.com/2011/03/13/predicting-location-of-one...

Sort of. You measure the latency from the user to the proxy + the proxy to the site, so what you end up with is the approximate location of the proxy and a radius around it where the user could be. But the radius is liable to be 3000 miles, and you can't even assume the user isn't really closer to the proxy than that because the user could be using more than one proxy or anything else that adds fixed network latency…

Assuming that the user only uses one proxy, you can use GeoIP to get his proxy location, and then if you account for the proxy-webserver distance, you can get a pretty accurate geolocation.

Re: Passive TCP/IP Geo-Location

#87
post #86
post #82

Earlier quoted context omitted.

Sort of. You measure the latency from the user to the proxy + the proxy to the site, so what you end up with is the approximate location of the proxy and a radius around it where the user could be. But the radius is liable to be 3000 miles, and you can't even assume the user isn't really closer to the proxy than that because the user could be using more than one proxy or anything else that adds fixed network latency…

Assuming that the user only uses one proxy, you can use GeoIP to get his proxy location, and then if you account for the proxy-webserver distance, you can get a pretty accurate geolocation.

> Assuming that the user only uses one proxy, you can use GeoIP to get his proxy location, and then if you account for the proxy-webserver distance, you can get a pretty accurate geolocation.

A congested network link can easily add more than 100ms of latency due to buffering. At the speed of light that's thousands of miles.

You can't even say that if the latency between the proxy and the browser is only 10ms then the user is physically close to the proxy, because you don't know if the user is running the browser on a VPS with something like X forwarding.

Re: Passive TCP/IP Geo-Location

#88
I'm not impressed so far. The demonstrator on the linked page found out that I live... somewhere in Europe.

You could get a more precise location by simply reverse-DNSsing my IP address.

Re: Passive TCP/IP Geo-Location

#90
post #84
post #71

Earlier quoted context omitted.

Some of the circles are inverse circles. I thought it was inaccurate at first too, until I realized the India result was telling me "you're NOT in Peru".

Just done it from the office. I'm definitely "not" in the ocean. http://i64.tinypic.com/28ujms7.png

Lol! Looks like this is saying:

Green: Not in the Indian Ocean.

Blue: Not in the Pacific near Ecuador.

Yellow: Not in the Southern hemisphere.

Red: Somewhere in Europe, Greenland, North Africa, or Svalbard.

In your case, the red circle is the only one that really matters. Yellow took a tiny slice out of it near Iraq.

Post reply on HN