Live data from Hacker News

We have ipinfo at home or how to geolocate IPs in your CLI using latency

blog.globalping.io

21–30 of 65 posts

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#21

> Globalping is an open-source, community-powered project that allows users to self-host container-based probes. These probes then become part of our public network, which allows anyone to use them to run network testing tools such as ping and traceroute. How's this different from RIPE ATLAS?

Atlas is great but it is focused more on academic research and professional use.

Globalping offers real-time result streaming and a simpler user experience with focus on integrations https://globalping.io/integrations

For example you can use the CLI as if you were running a traceroute locally, without even having to register.

And if you need more credits you can simply donate via GitHub Sponsors starting from $1

They are similar with an overlapping audience yet have different goals

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#22
If I understood the post the author just takes the location of smallest ping as the winner. This seems like a very rudimentary approach. Why not do triangulation? If you take each ping time as a measurement of distance between two points, you should be able to ping from a random selection of IPs and from there calculate the location.

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#23
post #20
post #2

This is a little project exploring the feasibility of using a service such as Globalping for geo location needs. I had fun making it but please note that the current implementation is just a demo and far from a proper production tool. If you really want to use it then for best possible results you need at least 500 probes per phase. It could be optimized fairly easily but not without going over the anon user limit wh…

I wonder if you could optimize for reducing the total probe count (at the expense of possibly longer total time, though it may be faster in some cases) by using some sort of "gradient descent". Start by doing the multi-continent probe, say 3x each. Drop the longest time probes, add probes near the shortest time, and probe once. Repeat this pattern of probe, assess, drop and add closer to the target. You accumulate al…

Yes, most likely there are multiple algorithms that could be used to get better results with fewer probes, but I'm not smart enough to do the math and implement them.

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#24

If I understood the post the author just takes the location of smallest ping as the winner. This seems like a very rudimentary approach. Why not do triangulation? If you take each ping time as a measurement of distance between two points, you should be able to ping from a random selection of IPs and from there calculate the location.

Packets don't travel in straight lines.

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#25

If I understood the post the author just takes the location of smallest ping as the winner. This seems like a very rudimentary approach. Why not do triangulation? If you take each ping time as a measurement of distance between two points, you should be able to ping from a random selection of IPs and from there calculate the location.

I talk a little about it in the article, but the main goal was to build something simple that works as proof of concept.

This brute force approach works much better than I expected as long as you have enough probes and a bit of luck.

But of course there are much better and smarter approaches to this, no doubt!

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#26

> Group and sort the results; the country with the lowest latency should be the correct one Sometimes residential ISPs (that hosts the probe) may have a bad routing due to many factors, how does the algorithm take that into account?

You have a lot of probes so you also have one with good routing

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#27

How feasible would it be for the host under measurement to introduce additional artificial latency to ping responses, varying based on source IP, in order to spoof its measured location?

Courtesy of Xfinity and Charter overprovisioning most neighborhood’s circuits, we already have that today for a significant subset of U.S. Internet users due to the resulting Bufferbloat (up to 2500ms on a 1000/30 connection!)

Have you seen excessive bufferbloat on a DOCSIS 3.1 modem?

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#28
post #5

How feasible would it be for the host under measurement to introduce additional artificial latency to ping responses, varying based on source IP, in order to spoof its measured location?

Totally feasible but a bit like all these situations - it’s not happening in practice.

Hacks

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#29
post #23
post #20

Earlier quoted context omitted.

I wonder if you could optimize for reducing the total probe count (at the expense of possibly longer total time, though it may be faster in some cases) by using some sort of "gradient descent". Start by doing the multi-continent probe, say 3x each. Drop the longest time probes, add probes near the shortest time, and probe once. Repeat this pattern of probe, assess, drop and add closer to the target. You accumulate al…

Yes, most likely there are multiple algorithms that could be used to get better results with fewer probes, but I'm not smart enough to do the math and implement them.

The simplest is drop the longest latency probe, and add a new one in the proximity of the fastest.

Re: We have ipinfo at home or how to geolocate IPs in your CLI using latency

#30

If I understood the post the author just takes the location of smallest ping as the winner. This seems like a very rudimentary approach. Why not do triangulation? If you take each ping time as a measurement of distance between two points, you should be able to ping from a random selection of IPs and from there calculate the location.

Packets don't travel in straight lines.

This is/was also my take. I’m skeptical that a probe-based network can be granular enough to reliably pinpoint a city, especially when some paths are much better connected than others (fewer hops, uncongested fiber, no throttling).

However, ipinfo still appears to rely on active probing to triangulate geolocation data, which suggests they believe these routing asymmetries can be modeled or averaged out in practice.

https://ipinfo.io/blog/ipinfos-probe-network

Post reply on HN