I have an endpoint https://my-portal.nl and I wan't to place a WAF with the OWASP Core rule set before it. So I found a Docker image(owasp/modsecurity-crs:apache) that can proxy all the requests to my endpoint (https://my-portal.nl). For some reason I can't get it to work. When I browse for https://localhost I'm getting a
"Forbidden You don't have permission to access this resource." response from the server.
This is the command I executed:
docker run -dti \
--name apachecrs \
--env PARANOIA=1 \
--env ANOMALYIN=5 \
--env ANOMALYOUT=5 \
--env ALLOWED_METHODS="GET POST HEAD" \
--env MAX_FILE_SIZE=5242880 \
--env RESTRICTED_EXTENSIONS=".conf/" \
--env PROXY=1 \
--env PORT=8443 \
--publish 443:443 \
--env BACKEND=https://my-portal.nl:8443 \
owasp/modsecurity-crs:apache
What am I doing wrong?
ANSWERED: There was no issue. The above example is correct. When a rule is active. The proxy returns a:
"Forbidden You don't have permission to access this resource." response from the server.