I am on traefik 2.11.3.
I am following the instruction here https://github.com/acouvreur/traefik-modsecurity-plugin/blob/main/docker-compose.yml to add this middleware to my stack.
The latest owasp/modsecurity-crs:apache
is having issues, so I use this version:
owasp/modsecurity-crs:4.1.0-apache-202404070904
I can verify modsecurity
is running by log into the modesecurity
container and do a curl command. For example
curl http://localhost
will return 200
but
curl http://localhost?a=../asdf
returns 403.
However, it is not working from traefik container. I ssh into traefik container, there is something strange:
- curl
http://waf
command does not seem to generate any log in modsecurity container. - curl
http://10.0.9.1
will generate log in modsecurity container (waf's ip is 10.0.9.1) - curl
http://10.0.9.1?a=../
still returns 200. In the modsecurity log, sees all url params are gone.
Any ideas?