2019-01-11 21:22:19 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Rick Elrod <relrod@redhat.com>
|
|
|
|
# (c) 2019 Red Hat, Inc.
|
|
|
|
# etc.
|
2014-12-06 22:46:11 +00:00
|
|
|
|
2019-01-11 21:22:19 +00:00
|
|
|
# Fail early
|
|
|
|
set -e
|
2014-12-06 22:46:11 +00:00
|
|
|
|
2019-01-11 21:22:19 +00:00
|
|
|
rm -f GeoLite2-Country-CSV.zip csvs/*
|
2014-12-06 22:46:11 +00:00
|
|
|
|
2019-01-11 21:22:19 +00:00
|
|
|
wget -q -T 5 -t 1 https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
|
|
|
|
unzip -j GeoLite2-Country-CSV.zip -d csvs/
|
2019-01-11 21:28:54 +00:00
|
|
|
geoip.py csvs/GeoLite2-Country-Blocks-IPv4.csv csvs/GeoLite2-Country-Blocks-IPv6.csv csvs/GeoLite2-Country-Locations-en.csv > /var/named/GeoIP.acl
|