Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

geoip

maxmind

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

like image 526
Peter Gosling Avatar asked Jan 28 '20 10:01

Peter Gosling


3 Answers

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
like image 137
s01ipsist Avatar answered Nov 02 '22 06:11

s01ipsist


I think instead of going through the lengthy registration process, one should download it from this github repo. At the time of this writing, this repo was very recent.

like image 42
sa-mustafa Avatar answered Nov 02 '22 04:11

sa-mustafa


Permalinks for GeoLite2 Country×

Below are permalinks that you can use to download the database.

Remember to replace YOUR_LICENSE_KEY.

Database URL

https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=YOUR_LICENSE_KEY&suffix=tar.gz

SHA256 URL

https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=YOUR_LICENSE_KEY&suffix=tar.gz.sha256

like image 20
Ashish Chaturvedi Avatar answered Nov 02 '22 04:11

Ashish Chaturvedi