The Network Administrator’s Guide to IP Geolocation

IP geolocation is a term used to identify or estimate the geographic location of an IP address and therefore a location of specific device that uses that IP address.

This guide is meant for network operators and assumes that your organisation already has IP address space that you want to geolocate, but if that isn’t the case, LIR SERVICES is a trusted provider of IP Address Lease and ASN Registration.

Importance of IP geolocation

For the most part, many services depend on knowing the user’s location to work correctly. Some examples are:

Relevant Content – among others, Google uses the IP geolocation to serve search results targeted to the user’s location. This way, when you search for, let say “bakery”, you will see results targeted for your current location. The same goes for Ads. You are more likely to see an Ad for businesses in your area rather than those from miles away.

Language-Specific Content – at the same time, many multilingual websites use the IP geolocation to serve pages in a particular language based on the IP country of origin. Unless you are in Poland or fluent in Polish, you probably wouldn’t want to see your pages displayed in Polish and prices in PLN.

Content Restrictions – Netflix, BBC iPlayer, are examples of services that employ restrictions based on IP geolocation. That happens mainly due to content licencing restrictions. Anyhow, ever tried watching iPlayer from outside of the UK? Well, it doesn’t work!

Local Legislation – IP geolocation can help to ensure regulatory compliance in certain jurisdictions. One example of this is GDPR in the European Union that requires the website owners to display a specific notice to their EU based visitors, but not necessary to everyone else.

Access Control List – some websites are known to limit access or even completely ban visitors from certain countries – all due to an increased risk of abuse, such as hacking from these less reputable jurisdictions.

Fraud Prevention – credit card processors use the IP geolocation and attempt to match that with the billing address of a cardholder in their fraud prevention decision-making process.

Sources of IP geolocation data

Hopefully, by now, you understand the benefits of the IP geolocation and why it is essential for your business whether you are an ISP or a hosting provider. Lets now look at the sources of IP geolocation data, and available providers.

Initially, information about the IPs was kept in RIRs (Regional Internet Registry) whois databases such as the RIPE Whois Database and was maintained by the organisation that owned the IP addresses, such as the ISPs.

For this purpose, a country attribute on the inetnum and inet6num objects was made available. So network operators could set something like,

whois record showing the country attribute

There was no provision to define a more accurate location such as a city, knowing that the end user’s location generally differs from registered administrative contact location of an ISP making the accuracy of the geolocation data low.

To work around the shortcomings of the country attribute, RIRs introduced a new geoloc attribute to the inet(6)num objects. This attribute takes a form of GPS coordinates, so as an example a network located in Tokyo, Japan would use

whois record showing the country and geoloc attributes

However, it is essential to mention that at the time of writing this post, the method isn’t authoritative and the geoloc attributes may be ignored in case that the conflicting data exists in more reputable sources.

IP geolocation Databases

At the same time, several IP geolocation services appeared on the market. There are free and paid databases among them. The general idea is that if you are building a service that depends on precise geolocation of your users, then you likely need access to their entire database, which usually comes with a price tag attached. Still, these databases highly depend on the accuracy of the IP data that they provide to their customers, so the details relating to your IP address space can be corrected free of charge.

The following databases are known to be in operation:

All of the above databases use various sources to estimate the location of any given IP. Some of these sources are:

Whois Databases – previously mentioned Regional Internet Registry, that includes data about the country of registration, the GPS coordinates from geoloc whois attribute.

Data supplied by the users – some websites such as weather forecast take the user’s postcode, and share alongside the IP address with one or more of the IP geolocation providers.

Data supplied by the ISPs – many ISPs submit this data to IP geolocation services voluntarily to ensure that their clients get content tailored to their location. 

Routing Information  – several techniques such as automated traceroute are employed to map the connections of various infrastructures on the internet. The maps are then used to estimate geolocation.

Updating IP geolocation Databases

As you hopefully appreciate by now, your business can not rely on the accuracy of data in just as single of these databases, and you should contact all these providers to ensure that your IP geolocation data is correct across the board. That makes perfect sense knowing that it is hard to tell which website uses which of these databases.

To save you time we have prepared the below contact information for all the previously listed providers.

DatabaseContact
GeoLite2 by Maxmindrequest form
Googlerequest form
IP2Location[email protected]
DB-IP[email protected]
IPinfo[email protected]
NetAcuity IP by Digital Envoy[email protected]
NeuStar IPintelligence[email protected]
ipapi.co[email protected]
ipgeolocation.io[email protected]
BigDataCloud[email protected]
ipregistry[email protected]
EurekAPI[email protected]

Geofeeds

Self-published IP Geolocation Data or simply a Goefeed, is an advanced topic. The first thing to mention is that the Geofeed is currently a draft and not an approved RFC. This fact, however, did not stop the internet community from embracing the concept. The first version of the draft was published in 2013, so it has been around for a while.

The Geofeed allows network operators to publish the IP geolocation for the IP blocks that are under their control. The feeds are published in the CSV format and contain the following information:

ip_range,country,region,city,postal_code

The idea is that the content providers will be able to process changes to your IP space geolocation automatically, based on the Geofeed that you publish, which saves you time on having to contact these providers individually to notify of any changes.

Unfortunately, currently, no standardised mechanism for advertising your feed to the rest of the world exists. A few ideas were proposed, such as the NAPT records in the reverse DNS zone, but in reality, the network operators still share the Geofeed URLs with interested parties via an e-mail.

As a side note,  LACNIC now offers a hosted Geofeed for network operators from within their service region. That might be easier than hosting the Geofeed on your servers for some.

Now, it isn’t straightforward to tell which content providers support the Geofeeds – and we haven’t heard of anyone other than Google admitting they support Geofeed publically. Interestingly Google came up with the idea of Geofeed originally. The point is that even if a list of content providers that support Geofeeds existed, it would be a lot of work to contact all these providers to have them poll your Geofeed for updates regularly.

Finally, the Geofeeds are much easier to administer than the geoloc entries. The Geofeeds are just a flat file that can be edited at speed. At the same time, geoloc entries are troublesome to manage at scale (i.e. when you subdivide IP blocks that are then in use at different locations) as they require separate objects in the whois databases.

Provider Support

So hopefully understand by now, most of your IP geolocation efforts should be centred around the IP geolocation databases as these databases are de facto the standard today. We’ve also coverer the geoloc attributes in the RIR whois databases and the self-published Geofeeds.

So what we did next was that we reached to all the previously listed IP geolocation database providers to ask about their support for geoloc attributes and the self-published geofeeds. Here is what we found…

Providergeolocgeofeed (update interval)
MaxMind? [0]Y (Ad-hoc)
IP2LocationN [1]N [1]
DB-IPYY (Weekly)
IPinfoYY (Daily)
Digital EnvoyYY (Weekly)
NeuStar?Y (Weekly)
ipapi.coYY (Daily)
ipgeolocationYY (Daily)
BigDataCloudYY (Daily)
ipregistryYY (Daily)
[0] Maxmind did not respond to our queries by the time this post was published.
[1] IP2Location confirmed that they specifically discontinued geoloc and geofeeds support and now rely mainly on routing information because of abusive usage to manipulate location by certain organisations. Still, they remain a reputable geolocation provider and can not be neglected.

If you are an IP Geolocation provider and haven’t been included in this blog post, contact us using our contact form. When reaching out to us, please include the company name, the URL, the client-facing support e-mail or an update form URL as well as whether you support Geofeeds and the poll interval offered.

Final words…

So there you have it: everything you need to know about having your IP address space geolocated correctly. We hope that this guide has helped you to understand everything you need to know about IP geolocation and why it is essential to your business. 

We appreciate that this is a lot of work to liaise with all these providers, so for all our IP Address Lease clients, we include initial submission to all the IP geolocation databases free of charge.

As a final note, please bear in mind that an up to date entry in all the IP Geolocation databases does not guarantee that your IP Address Space will be recognised appropriately everywhere. This happens because some content providers download the updates from the IP Geolocation databases less frequently than others. If this happens to you, our advice is to contact the specific content provider and ask them to download the IP Golocation updates.

Comments are closed.