ipinfo.io uses a probe network for this[1], but even then a server physically located in the Netherlands with an IP announced as being from, say, Seychelles would still respond to pings faster from a European location than from somewhere like Singapore (unless you go out of your way to induce latency to ICMP responses).
[1] https://ipinfo.io/blog/probe-network-how-we-make-sure-our-da...
First, we use active measurement for IP geolocation as our primary source. Our main data source is our ProbeNet infrastructure, which consists of 1,200 PoPs across 500 cities. Through ProbeNet, we run active measurements to every IP address and routable IPv6. Because we run both ping and traceroute, we typically have a very strong sense of where an IP address is located.
However, ProbeNet is not our only data pipeline. We process several dozen additional data sources. For example, unrouted or unassigned IP addresses do not generate active measurements, so we must rely on other forms of data.
In reality, we must “fallback” to alternative location evidence when active measurement is unavailable. Even though we manage, expand, and maintain a very large server network and a highly complex data pipeline, some IPs require us to rely on what the ASN operator reports.
It’s fair to say that no ASN other than AS131279 (https://ipinfo.io/AS131279 ) is located in North Korea. However, if someone asks for evidence showing that a particular IP address is not located in North Korea, that is extremely difficult to prove in isolation. We prefer not to rely on a null-island methodology and instead choose a location based on a hierarchy of hints.
For unrouted or unassigned IP addresses, geolocation can point to random locations, and in such cases we often must rely on the ASN operator’s data. I’ve seen this happen, even among well-established ASN operators. Some assign random placeholder locations to unrouted and unassigned ranges particularly for IPv6 IP addresses.
More context:
https://community.ipinfo.io/t/the-north-korean-gamers-on-ste...
https://community.ipinfo.io/t/why-is-this-orange-com-ip-rang...
Previous discussion: https://news.ycombinator.com/item?id=5319419
Some background info: in China, all online discourse are required to show the user's provincial-level origin, or country name for non-mainland users, using geoip. this is enforced by the Cyber Admin Commission of CCP.
Interesting, this really does seem to work on any site behind CF. Are there any other endpoints like this?
also important point when you using Starlink and got totally different "relay" station sometimes can be thousand miles away, I think we need to "upgrade" our internet infrastructure for interplanetary system
> In reality, the “location” of an IP is inherently fuzzy. For instance, my 2a14:7c0:4d00::/40 block was originally allocated to Israel. But later, I bought parts of this range and announced them via BGP in Germany, the US, and Singapore (see previous article on Anycast networks). Meanwhile, I’m physically located in mainland China. As the owner of this IP block, I can also freely edit the country field in the WHOIS database — and I set it to KP (North Korea).
> Because of this ambiguity, it’s nearly impossible to precisely determine an IP’s location using any single technical method. As a result, almost all geolocation databases accept public/user-submitted correction requests.
I would not be surprised if this practice is technically against most terms of service.
If this was the case, and theres tons of financial incentive to do so, wouldnt cloudflare,etc, block not based on the reported 'country' but some fuzzy heuristic that knows what country it comes from? hops?
But thanks to this series I setup an ARIN account, got allocated ipv6 and ipv4 addresses and starting the ASN assignment process. It’s a fun rabbit hole to go into.