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

wget -q -O - |gunzip > /usr/share/GeoIP/ && mv /usr/share/GeoIP/ /usr/share/GeoIP/GeoIP.dat                                                                                                  

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

See also the nice use of this in awstats!



Enter your comment. Wiki syntax is allowed:
If you can't read the letters on the image, download this .wav file to get them read to you.