Skip to content

Instantly share code, notes, and snippets.

@d1str0
Created March 27, 2019 22:36
Show Gist options
  • Save d1str0/e9967dfc52d1e0798be5bc914911f0f1 to your computer and use it in GitHub Desktop.
Save d1str0/e9967dfc52d1e0798be5bc914911f0f1 to your computer and use it in GitHub Desktop.
chmod +x update-geolite2.sh && ./update-geolite2.sh
#!/bin/sh
cd /opt/
mkdir GeoLite2-City
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz -O GeoLite2-City.tar.gz
tar xvf GeoLite2-City.tar.gz -C GeoLite2-City --strip-components 1
mv GeoLite2-City/GeoLite2-City.mmdb ./
mkdir GeoLite2-ASN
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz -O GeoLite2-ASN.tar.gz
tar xvf GeoLite2-ASN.tar.gz -C GeoLite2-ASN --strip-components 1
mv GeoLite2-ASN/GeoLite2-ASN.mmdb ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment