coreruleset / modsecurity-crs-docker

Official ModSecurity Docker + Core Rule Set (CRS) images
https://coreruleset.org
Apache License 2.0
269 stars 69 forks source link

ModSecurity not compiled with GeoIP support on arm64 #51

Closed rfricz closed 2 years ago

rfricz commented 2 years ago

Hi, when running the nginx image on arm64 arch, I have to disable (delete) the REQUEST-910-IP-REPUTATION rule to be able to start nginx, otherwise it fails with

nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /etc/modsecurity.d/owasp-crs/rules/REQUEST-910-IP-REPUTATION.conf. Line: 76. Column: 22. This version of ModSecurity was not compiled with GeoIP or MaxMind support.  in /etc/nginx/conf.d/modsecurity.conf:2

The amd64 arch doesn't have this problem.

I can see that libgeoip-dev is installed in the owasp/modsecurity:nginx image before building ModSecurity, so I don't understand why it fails. I have tried installing various packages (libgeoip1 libgeoip-dev geoip-database geoip-database-extra geoip-bin) into the container, but it doesn't help. Am I missing something? Could you please verify that ModSecurity gets built with GeoIP or MaxMind support?

Thanks so much for providing this image.

fzipi commented 2 years ago

This is solved by https://github.com/coreruleset/modsecurity-docker/pull/98.

fzipi commented 2 years ago

@rfricz It is building now, should take ~~ 4 hours.