IP -> Location is 'Mission Impossible'?
No, it isn't. But you have to be almost as tricky as Jim Phelps,
have enough tools like Mr. Gadget and be smart like Roger Rabbit.
The Problem
There is a standard. It is not used because the companies that 'own'
the IP numbers don't have interest in providing location data. Various
reasons: competitor could 'learn' something from those data, terrorist
attacks, already existing inhouse-solutions that solve this task or
simply no need.
So the common approach is to analyze WHOIS-data and to match postal
address data to latitude/longitude.
And this fails?
Yes. I mean, NOOO!
Let it say this way:
- There are a lot of ways to write down an address.
- Not every country has 'ZIP codes'.
- And not for every ZIP code table a latitude/longitude database is available.
- Ever thought about how many different spellings a town name can have?
The town has a name in its native language and translated into several other
languages. Now let us guess what a employee will enter into an international
database? English? His native language? The language enacted by his company
that he doesn't speak and write well?
- Is the latitude/longitude database valid? Accuracy? Missing towns? How
to handle duplicate town names?
You see: lots of problems. A detailed analysis of the German WHOIS
data (Hey, we are perfect if there is anything to organize! :-) shows
at least 5 common different types of data styles.
So now...
.. you need a list of town names (english, native), countries and take one
address after the other and test what town it is.
Other Problems
Owner of larger IP number ranges or huge companies tend to use their
companies headquarter as 'owner'. Some providers like MSN and AOL
use their own net and transport technologie. So there is no information
where an IP is located.
Solution for 3d Traceroute
I use a commercial database bought from one of the well known providers
of 'internet location data'. They say about their own data "The
database has over 95% of accuracy in country and ISP level, 70% in
region level and 65% in city level, which is higher than any of our
competitors.".
This database is optimized by a set of programs that analyze some
regions I have data for, do some plausibility checks and replace the
commercial data if quality is better.