|   
 GeoIPlookup
rpm -Uvh http://mirrors.kernel.org/fedora-epel/5/i386/epel-release-5-4.noarch.rpmInstall EPEL repo first.
 rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
 
 
 
yum install geoipInstall geoip and try geoiplookupgeoiplookup 8.8.8.8
 
 
 Install geoip databases from Maxmind websitewget 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
sudo cp GeoIP.dat GeoIPASNum.dat GeoLiteCity.dat /usr/share/GeoIP/ 
 http://geolite.maxmind.com/download/geoip/database/
 
 
 geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat 23.66.166.151Try again to locate city name from database file "GeoLiteCity.dat" 
 P.S. It is another online method to check : curl ipinfo.io/8.8.8.8
 
cat /tmp/ip.txt | awk '{ system("echo `geoiplookup "$1" |grep Country |cut -d ':' -f2` `geoiplookup "$1" |grep City |cut -d ',' -f4,5` "); print }'
eg result :
US, United States
8.8.8.8
US, United States
73.170.190.82
MD, Moldova, Republic of
89.28.41.90
Use awk in file to find geoip and locate the city and country name 
 
 
         
Server is hosted by Alanstudio  
Linux Operating System 
 
Recommend screen resolution 1024 x 768 / IE / FireFox  
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved. 
 |