User Tools

Site Tools


blog:maxmind_geoip_on_debian_lenny

This is an old revision of the document!


Maxmind geoip on debian lenny

Mapping ips to a country is often interesing. To enable this in Debian lenny:

aptitude install geoip-bin

To update the ip database daily, create a small script and make a symlink to it in /etc/cron.daily

#!/bin/sh                                                                                      
wget -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -O - |gunzip > /usr/share/GeoIP/GeoIP.dat.new && mv /usr/share/GeoIP/GeoIP.dat.new /usr/share/GeoIP/GeoIP.dat                                                                                                  

You can then look from which country an ip is with geoiplookup 1.2.3.4

See also the nice use of this in awstats!

~~LINKBACK~~

Discussion

Enter your comment. Wiki syntax is allowed:
  _      __  ____    __  ___   ____ __  __
 | | /| / / / __ \  /  |/  /  / __/ \ \/ /
 | |/ |/ / / /_/ / / /|_/ /  _\ \    \  / 
 |__/|__/  \___\_\/_/  /_/  /___/    /_/
 
blog/maxmind_geoip_on_debian_lenny.1287912094.txt.gz · Last modified: 2010-10-24 11:21 by brb