Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.37 KB

File metadata and controls

28 lines (21 loc) · 1.37 KB

Docker xtables_geoip image

Docker image based on alpine:3.8 with xtables-addons and Martin Schmitt's GeoLite2xtables scripts to create legacy format GeoIP database.

Note: As of 7 January 2020, changes have been made to the convert script, see commit 329927a6.

MaxMind license key

Sign up for a MaxMind account and create a license key to use their GeoLite2 databases. On running the Docker set your license key as an environment variable (-e LICENSE_KEY=xxxxxxxxxxxxxxxx, where xxxxxxxxxxxxxxxx is your license key).

Building and running

A volume /xt_build can be used to get the results. Replace [path to folder] in the following commands with the correct path to the xt_geoip on the host machine. On Ubuntu the default GeoIP data folder is /usr/share/xt_geoip.

Build from source and run

$ git clone https://github.com/sander1/docker-xtables.git
$ cd docker-xtables
$ docker build --tag=xtables_geoip .
$ docker run -e LICENSE_KEY=xxxxxxxxxxxxxxxx --rm -v [path to folder]:/xt_build xtables_geoip

Pull from Docker Hub and run

$ docker run -e LICENSE_KEY=xxxxxxxxxxxxxxxx --rm -v [path to folder]:/xt_build sander1/xtables_geoip