How to download GeoLite2-Country.mmdb.gz now need to add access code

Peter Gosling picture Peter Gosling · Jan 28, 2020 · Viewed 8.9k times · Source

Plugin I have uses this url which no longer works as need a license key obviously now https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz

I have tried this url (Note: I have removed my license key from the below) but it doesn't work any ideas

https://download.maxmind.com/app/geoip_download_by_token?edition_id=GeoLite2-Country&license_key={LICENSE KEY HERE}&suffix=mmdb.gz

Answer

s01ipsist picture s01ipsist · Sep 5, 2020

You will need a (free) license key. You can use this bash 1 liner with YOUR_LICENSE_KEY

curl "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=YOUR_LICENSE_KEY&suffix=tar.gz" -o GeoLite2-Country.tar.gz \
  && tar -xzvf GeoLite2-Country.tar.gz \
  && mkdir -p /var/opt/maxmind/ \
  && mv GeoLite2-Country_*/GeoLite2-Country.mmdb /var/opt/maxmind/GeoLite2-Country.mmdb