Geo Guardian: easy GeoIP based ForwardAuth containers with metrics

Hi everyone,

I’ve tried a couple of plugins to get GeoIP based blocking working for my server at home, but found no solution that worked for me (easy database updates, support for latests GeoIp format, metrics for Prometheus/Grafana, possible to use with stock docker image). So i wrote something my self that is as fast as my previous Nginx ForwardAuth setup.

You can find all information here:

Hope someone else can benefit from this as well.

Does this mean you pull the GeoIP database every 15 minutes?

Hot database reloads without restarts (every 15 minutes)

It seems MaxMind only updates daily and their example fetches only twice a week.

No. If you look in the compose: you can use the maxmind geoipupdate docker image which takes care of the database updates. Both containers share the same volume and geo guardian checks if the mtime of the database changed every 15 minutes. When it changed it does a database reload.

So it follows the maxmind download strategy, and with reload within 15 minutes. I will clarify this in the readme.

1 Like