Hi All,
I have a modsecurity rule that continues to throw a processing error against REQUEST_HEADERS:X-Forwarded-For - no matter how I tweak it.
What's weird is this exact same rule works correctly against REMOTE_ADDR
My guess is something about the X-Forwarded is not loading / showing correctly for ModSec (maybe apache config? Apache/2.4.46 (cPanel) )
Rule is:
SecRule REQUEST_HEADERS:X-Forwarded-For "@ipMatchFromFile blacklist-ips.txt" "id:4100003, phase:1, log, drop, status:411, msg:' *** blacklist Custom IPs X-Forwarded-For'"
Error is:
Apache-Error: [file "apache2_util.c"] [line 271] [level 3] [client 85.115.60.201] ModSecurity: Rule processing failed (id=4100003, msg= *** blacklist Custom IPs X-Forwarded-For). [hostname "[redacted].com"] [uri "/"] [unique_id "X1EKKw8RDek5sznInPGFjAAAABU"]
After the first error there is a cascade of rule processing errors for all the other rules after the failure (if that matters).
The forwarded line from the mod_sec audit log is:
X-Forwarded-For: 94.23.238.218, 85.115.60.201
Any suggestions for what I might be missing here?
Thanks!
Steve
I have a modsecurity rule that continues to throw a processing error against REQUEST_HEADERS:X-Forwarded-For - no matter how I tweak it.
What's weird is this exact same rule works correctly against REMOTE_ADDR
My guess is something about the X-Forwarded is not loading / showing correctly for ModSec (maybe apache config? Apache/2.4.46 (cPanel) )
Rule is:
SecRule REQUEST_HEADERS:X-Forwarded-For "@ipMatchFromFile blacklist-ips.txt" "id:4100003, phase:1, log, drop, status:411, msg:' *** blacklist Custom IPs X-Forwarded-For'"
Error is:
Apache-Error: [file "apache2_util.c"] [line 271] [level 3] [client 85.115.60.201] ModSecurity: Rule processing failed (id=4100003, msg= *** blacklist Custom IPs X-Forwarded-For). [hostname "[redacted].com"] [uri "/"] [unique_id "X1EKKw8RDek5sznInPGFjAAAABU"]
After the first error there is a cascade of rule processing errors for all the other rules after the failure (if that matters).
The forwarded line from the mod_sec audit log is:
X-Forwarded-For: 94.23.238.218, 85.115.60.201
Any suggestions for what I might be missing here?
Thanks!
Steve