[nSLUG] GeoIP free databases and Geo::IP

francis picabia fpicabia at gmail.com
Tue Mar 19 13:11:54 ADT 2019

The packages geoip-database in Debian and
GeoIP-GeoLite-data in Redhat/CentOS
rely on static databases which are no longer being updated.


All I need from this is a quick way on the shell to look up
a country from an IP.

On Debian I could do that with geoiplookup
On Redhat/CentOS I could do that with a small perl script using Geo::IP

These tools still work, but the accuracy is drifting off over time.

I could make my own script solution around calls to https://freegeoip.app
but I can't be the only one looking into this issue.  Surely someone has
figured out something to do this well that gets that good ol' 1000 eyeballs

Has anyone encountered something like Geo::IP which will work against
the other free resources?  Or has anyone encountered a solution
which will work against the new GeoIP databases available by subscription
from Maxmind, the previous supplier of the free GeoLite DB?

Something like this done in a script would work:

wget -qO - https://freegeoip.app/csv/$IP | awk -F, '{print $3}'

It is limited to 10,000 lookups per hour.

Is there something better?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20190319/d882a923/attachment.htm>

More information about the nSLUG mailing list