Instalar geoip
Debian, Ubuntu, Linux Mint:
sudo apt-get install geoip-bin
Fedora:
sudo yum install geoip
CentOS:
sudo yum install geoip
Probar
geoiplookup 2.155.96.207
Instalar bases de datos de GeoIp desde MaxMind:
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gunzip GeoIP.dat.gz
gunzip GeoIPASNum.dat.gz
gunzip GeoLiteCity.dat.gz
cp GeoIP.dat GeoIPASNum.dat GeoLiteCity.dat /usr/share/GeoIP/
Uso
geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat 2.155.96.207
Uso
geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat 2.155.96.207