Graybeard
Well-Known Member
This is only tested in Ubuntu should work on Debian also? May work in Centos
#1 install
barry@paragon-DS-7:~$ sudo apt install geoip-bin
[sudo] password for barry:
then !
=====standard output;
barry@DS10:~/temporary$ geoiplookup 2.40.118.141
GeoIP Country Edition: IT, Italy
=============scripted output
id,2.40.118.141,IT
Super fast.
Could be easily scripted in a loop.
Use I intend -- checking server log entries FAST
Downside: only country names
IP to Country console command
details
#1 install
barry@paragon-DS-7:~$ sudo apt install geoip-bin
[sudo] password for barry:
then !
=====standard output;
barry@DS10:~/temporary$ geoiplookup 2.40.118.141
GeoIP Country Edition: IT, Italy
=============scripted output
Code:
$ ip=2.40.118.141; echo -n 'id,'$ip','; geoiplookup $ip |cut -d':' -f2|cut -d',' -f1|sed 's/^[ \t]*//;s/[ \t]*$//'
Super fast.
Could be easily scripted in a loop.
Use I intend -- checking server log entries FAST
Downside: only country names
IP to Country console command
details
Last edited: