Closed Dr-Lazarus-V2 closed 1 month ago
I have a proposed solution to update the following file: modsecurity-crs-docker/nginx/Dockerfile
Added libmaxminddb-dev
to the list of installed packages:
libmaxminddb-dev
Modified the ModSecurity
configuration to include --with-maxmind
:
./configure --with-yajl --with-ssdeep --with-geoip --with-pcre2 --with-maxmind --enable-silent-rules;
Added libmaxminddb-dev
to the additional packages:
libmaxminddb-dev
These are the main changes reflecting the use of maxmind
for GeoIP lookups instead of the previous geoip
module.
Thanks @Dr-Lazarus-V2.
Thanks @Dr-Lazarus-V2 . Can you provide a patch for nginx/Dockerfile
, nginx/Dockerfile-alpine
and openresty/Dockerfile-alpine
? Thanks! 🚀
@fzipi, How do I provide a patch?
Yes, can you? Just editing the files in the web interface will guide you in the process...
Okiee, I will try and raise a patch today.
Fixed by #288.
Issue: Lack of GeoLocation Support in OWASP CRS 4.5 Nginx Image
Description:
The OWASP CRS 4.5 Nginx Docker image, which is built on top of ModSecurity v3, is currently compiled with the following configuration flags:
However, it appears that support for GeoLocation lookups is missing from this configuration, as the
SecGeoLookupDb
directive fails to load the GeoIP database. Specifically, the--with-maxmind
flag seems to be missing, which is necessary for enabling MaxMind GeoIP database support.Problem:
When trying to use the following configuration in ModSecurity:
ModSecurity fails to load the database, resulting in the inability to block traffic based on GeoLocation. This issue affects users who need GeoIP-based rules for their Web Application Firewall (WAF) using the CRS 4.5 Nginx image.
Steps to Reproduce:
SecGeoLookupDb
to point to a valid GeoIP database (e.g.,/path/to/GeoLite2-Country.mmdb
).