Geo Blocking with GeoIP on Apache (Debian)

Aus Matts Wiki

This article holds my notes on how to implement geo blocking on Apache web server.

Apache has a module called mod_geoip which is based on Maxminds GeoIP database format.

However, according to Maxmind the GeoIP database format was retired in May 2022: https://github.com/maxmind/geoip-api-mod_geoip2

Maxmind recommends to switch to GeoIP2 database format, which can be accessed with Maxmind's own mod_maxminddb module according to: https://github.com/maxmind/mod_maxminddb

For how to implement geo blocking with mod_geoip see: https://www.serpentcs.com/blog/technical-updates-304/using-apache-geoip-mod-redirect-or-block-traffic-based-on-countries-geo-location-550