May 21May 21 Support topic for Traefik GeoIP filter: a Docker container that works as a GeoIP allow/blocklist middleware for Traefik. Uses the Maxmind GeoLite2 database.Documentation is on Github: https://github.com/mpdcampbell/traefik-geoip-filterRequirementsMake sure Traefik is on the same Docker networkCreate a free account on MaxMind.com - then create a free license key in My AccountConfigure Traefik with for a new Forwardauth middlewareTraefik configurationThere are different ways to apply this middleware in Traefik. E.g. using Docker labels or by adding it to your default http router (so it applies to all of your containers). These examples are for the latter.Example for Traefik dynamic configuration (fileConfig.yml): http: middlewares: geoip-filter: -- ADD THIS LINE forwardAuth: -- ADD THIS LINE address: "http://traefik-geo-ipfilter:8080/traefik" -- ADD THIS LINE trustForwardHeader: true -- ADD THIS LINE maxResponseBodySize: 1048576 -- ADD THIS LINE Example for Traefik static configuration (traefik.yml): entryPoints: https: address: :443 http: middlewares: -- ADD THIS LINE - geoip-filter@file -- ADD THIS LINE
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.