Geolocating Your Users

I first became interested in geolocating a few decades ago while designing an email filtering system for some customers and noticing that most of the “spam and malware” originated in half a dozen countries..

History

Back then, there was a website I’d found for identifying locations of IP indexes[1].   Fortunately, my customers were fine with blocking the spam-spewing countries at the time.  We dropped packets from those countries at the outer firewall which solved the bulk of the problem spam, without even touching the mail server.  It was easy then..  Blocking 61.0.0.0/8 cut off all of Asia for example.

That website was a crude but effective means of finding information out about IP address ranges at the time.  Sometimes we’d also use traceroute and reverse DNS to find out more.

A number of companies and services have sprung up to fill the void left by the original website going away[2] in 2002.  GeoIP by MaxMind arrived[3] just a few months later as an example.  Client libraries were open source and annual database updates were free.  (Their current website[4] offers much more today and, kudos to them, they still offer free API’s and limited accuracy databases[6] which may be fine for many use cases.)

Today

Things have changed significantly in the intervening decades, at least for IPv4.  (Common IPv6 still remains “just around the corner” to this day of course, but data is also available.)

Geolocating via IP addresses are much more important today with eCommerce and advertising auction websites depending on it to locate their users, quickly.  Many companies are much more “global” and marketing worldwide is important as well.  Fraud detection is also an important use case.

A quick search found a comparison of some of the geolocation services which are available[5].  There are others and many of them offer free versions of their data and APIs to experiment with.  (I’ll be exploring some of these in a future article with some code and comparisons of my own.)

Currently, I’ve been experimenting with the MaxMind open source data and APIs[6] and I’ll share some of my findings soon.  In the meantime, I like their attitude[7]!

Have you used geolocation services before?  What are your use cases and experiences?


 

  1. WayBackMachine copy of “IP NETWORK INDEX” at ipindex.net
  2. ipindex.net website is gone, roughly March 2002
  3. WayBackMachine copy MaxMind.com, July 2002
  4. MaxMind Today
  5. A Comparison of a few Geolocation Providers
  6. MaxMind Open Source data and APIs
  7. MaxMind Charitable Giving