Re: GeoIP free databases and Geo::IP
I have the same problem. For my needs, the best solution I found turns
out to be the workaround you suggested using https://freegeoip.app.
The alternative seems to be something like
apt install geoipupdate mmdb-bin
# use the free license in GeoIP.conf:
cp /usr/share/doc/geoipupdate/examples/GeoIP.conf.default
/etc/GeoIP.conf
geoipupdate
# update every Tuesday
echo "04 04 * * 2 root /usr/bin/geoipupdate" >> /etc/crontab
Then you have mmdblookup, which outputs some clumsy pseudo-json that
needs to be parsed.
So thank you for the simple workaround you suggested :
wget -qO - https://freegeoip.app/csv/$IP | awk -F, '{print $3}'
So
Is there something better?
For my use case (I only need about a dozen lookups per day), that's the
best I could find
MI
Reply to: