explaingit

p3terx/geolite.mmdb

4,758Audience · ops devopsComplexity · 1/5LicenseSetup · easy

TLDR

A distribution mirror for MaxMind's free GeoLite2 IP geolocation databases (Country, City, ASN). Provides direct .mmdb file download links without requiring a MaxMind account login.

Mindmap

mindmap
  root((geolite.mmdb mirror))
    What it does
      Direct mmdb downloads
      No login required
    Database Files
      GeoLite2-Country
      GeoLite2-City
      GeoLite2-ASN
    Use Cases
      Docker builds
      Web server GeoIP
      Firewall and security
    License
      MaxMind EULA
      CC Attribution ShareAlike
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Pull the latest GeoLite2-Country or GeoLite2-City .mmdb file into a Docker image or CI pipeline without a MaxMind login.

USE CASE 2

Integrate IP-to-country lookups into a web server or firewall using the downloaded .mmdb database file.

USE CASE 3

Automate weekly database refresh using the short download URLs in a cron job or build script.

Getting it running

Difficulty · easy Time to first run · 5min

Review the GeoLite2 EULA and Creative Commons Attribution-ShareAlike 4.0 license terms before redistribution.

Databases are owned by MaxMind under their GeoLite2 EULA plus Creative Commons Attribution-ShareAlike 4.0, attribution is required and redistribution terms apply.

In plain English

This repository is a distribution mirror for three geolocation database files produced by MaxMind: GeoLite2-Country, GeoLite2-City, and GeoLite2-ASN. These are binary database files in the .mmdb format that let software look up information about an IP address, such as which country or city it appears to be located in, or which internet service provider owns that particular address block. MaxMind is a company that builds and maintains IP intelligence products. The GeoLite2 databases are the free, publicly available tier of their offering. They are widely used in web servers, analytics tools, firewalls, security systems, and content delivery networks to determine where a visitor is connecting from, restrict or allow traffic based on geography, or serve localized content to users in different regions. The repository itself does not contain source code. Its purpose is to provide convenient, direct download links to the three database files without requiring a MaxMind account login for every download. The files are stored on a dedicated download branch and can be fetched via short URLs or direct GitHub raw links, which makes them easy to pull into automated build pipelines or Docker container images. The databases are the property of MaxMind and are covered by their GeoLite2 End User License Agreement along with a Creative Commons Attribution-ShareAlike 4.0 license. Anyone planning to use or redistribute these files should review those terms carefully, as they include attribution requirements. This is not a software project in the traditional sense. The README is brief and the repository serves purely as a file distribution convenience.

Copy-paste prompts

Prompt 1
I want to add GeoIP lookup to my Nginx config using GeoLite2-Country. Give me the wget command to download the .mmdb from the p3terx/geolite.mmdb mirror and the nginx.conf snippet to load it.
Prompt 2
Using the GeoLite2-City database from the p3terx/geolite.mmdb mirror, write a Python snippet using the maxminddb library to look up the city and country for an IP address.
Prompt 3
Show me a Dockerfile that downloads the latest GeoLite2-ASN.mmdb from the p3terx mirror at build time and copies it into the image for an app that needs ASN lookups.
Prompt 4
Write a bash cron job that downloads a fresh copy of GeoLite2-Country.mmdb from the p3terx/geolite.mmdb GitHub raw link weekly and restarts a service to pick it up.
Open on GitHub → Explain another repo

← p3terx on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.