MaxMind GeoIP Databases

Enabling geographic routing with your own MaxMind databases
You're viewing a development version of manager, the latest released version is 1.6.2

The current page MaxMind GeoIP Databases doesn't exist in version 1.6.2 of the documentation for this product.
We can take you to the closest parent section instead: /docs/acd/components/manager/1.6.2/installation/

Overview

The manager looks up the location, network and anonymity of client addresses in MaxMind GeoIP databases, for geographic routing and the GeoIP API. The databases are not shipped with the CDN Manager: obtain them from your own MaxMind subscription.

Three databases are needed, as .mmdb files:

DatabaseExample file nameName must contain
CityGeoIP2-City.mmdbCity
ASNGeoLite2-ASN.mmdb or GeoIP2-ASN.mmdbASN
Anonymous IPGeoIP2-Anonymous-IP.mmdbAnon

Provide all three or none. Without them, the CDN Manager installs and runs, but geographic routing is off.

Adding or Updating the Databases

  1. Copy the three files into /etc/acd/deploy/maxmind/, replacing any older copies:

    cp GeoIP2-City.mmdb GeoLite2-ASN.mmdb GeoIP2-Anonymous-IP.mmdb /etc/acd/deploy/maxmind/
    ls -l /etc/acd/deploy/maxmind/
    

    Expected output:

    total 126236
    -rw-r--r--. 1 root root      4382 Oct 14 18:57 GeoIP2-Anonymous-IP.mmdb
    -rw-r--r--. 1 root root 121642973 Oct 14 18:57 GeoIP2-City.mmdb
    -rw-r--r--. 1 root root   7609502 Oct 14 18:57 GeoLite2-ASN.mmdb
    -rw-r--r--. 1 root root       400 Oct 14 18:57 README.txt
    
  2. Run deploy:

    /mnt/esb3027/deploy
    

deploy loads the databases into the cluster after installing the CDN Manager, and loads them again only when they have changed. MaxMind publishes updates regularly: repeat these steps to apply them.

The databases are not included in the backups deploy takes. Keep your own copies.

Checking the Databases

When the databases are loaded, the final health check of deploy reports:

"msg": "Deployment gate PASSED for cdn-platform. GeoIP is serving."

To look up an address yourself:

curl 'https://manager.example.com/api/v1/routing/geoip?ip=8.8.8.8'; echo

Expected output (shortened):

{"city":{"continent":{"code":"NA",...},"country":{"iso_code":"US",...},...},"asn":{"autonomous_system_number":15169,"autonomous_system_organization":"GOOGLE"},"anon":{}}

See the Routing API for the full response.

Keeping the Files Elsewhere

To use files kept in another folder, set their paths in Site Settings instead of copying them:

maxmind_city_db: "/opt/maxmind/GeoIP2-City.mmdb"
maxmind_asn_db: "/opt/maxmind/GeoLite2-ASN.mmdb"
maxmind_anon_db: "/opt/maxmind/GeoIP2-Anonymous-IP.mmdb"

Problems

CodeCauseFix
[ACD-MAXMIND-INCOMPLETE]maxmind/ holds some, but not all three, databases.Provide all three, or none.
[ACD-MAXMIND-AMBIGUOUS]More than one file matches the same database.Leave one file per database.