How to Get IP geolocation on Ubuntu with MaxMind geoip

MaxMind GeoIP is a collection of APIs for looking up the location of an IP address. It includes support for lookup of country, region, city, latitude, and longitude. Free GeoLite databases are available for the country and city.

First install the software :

aptitude install geoip-bin
mkdir /usr/local/share/GeoIP
cd /usr/local/share/GeoIP
gunzip GeoLiteCity.dat.gz
ln -s /usr/local/share/GeoIP/GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat


To use it :


Leave a comment