In this tutorial, we demonstrate how to create an IP to location index and then serve it in a simple web application.
The data used to create an IP to location index is publicly available from the 5 Regional Internet Registries (RIRs)
Here is the list of the 5 RIRs.
These Regional Internet Registries contain records that link IP address ranges to organisations along with some metadata. It is not always possible to extract meaningful data from these registries because they are not normalised.
The workflow executed in the following command contains multiple steps.
baremaps workflow execute --file examples/geocoding/workflow.json
The following command will serve the Geonames index over HTTP in a simple web application.
iploc serve --database iploc.db --port 9000
Go to http://localhost:9000/ to see it in action.
In this tutorial, we learnt how to create an IP to location index and serve it in a simple web application. IP to location has many uses, one of which is to locate users that connect to a website to generate statistics.