Congrats, you're on your way to hard core security with mod_security! But now you're audit log is filling up faster than a North Dakota Bear at a Golden Coral (Sorry, Brian) with general errors that DO NOT trigger any mod_sec rules.
Normally, out of the box, you'll have mod_security's SecAuditEngine rules set like so:
SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus "^(?:5|4(?!04)"
SecAuditLogParts ABIJDEFHZ
SecAuditLogType Serial
SecAuditLog "|bin/rotatelogs.exe -l -f f:/logs/%Y-%m-%d-modsec-audit.log 86400"
Or ... something close to that. Let's break down the REGEX on the line for SecAuditLogRelevantStatus:
?:5 -- Log anything that is a 500 level error, e.g., 500 Internal Server Error or the lovely 503 Service Unavailable.
4(?!04) -- Log any 400 level error EXCEPT for any 404 errors.
I'm all for the 500 level errors being logged as those should never happen, but for my modsec_audit log I'm FILLING up with about a million 401's that I could care less about. Apache is going to grab these anyway in a much more compressed format, so I don't need to also see these in my modsec log. So, to fix that (and if you're a REGEX noob like me) just modify that 4(?!04) line to read:
"^(?:5|4(?!04|01)"
By adding that "|01" to the end, we're just saying any 404 OR 401's, which, Apache is going to grab for you anyway.
Hope that clears up your mod_sec logs!!
Do this hack to drop 2 lbs of fat in 8 hours
ReplyDeleteWell over 160 thousand men and women are hacking their diet with a simple and secret "liquids hack" to lose 1-2lbs each night in their sleep.
It's painless and works with anybody.
You can do it yourself by following these easy steps:
1) Take a clear glass and fill it up with water half the way
2) Now learn this weight losing hack
and you'll become 1-2lbs thinner in the morning!
Chriscientfic: Mod_Security - Get 401 Errors Out Of Relevant Status Logs! >>>>> Download Now
ReplyDelete>>>>> Download Full
Chriscientfic: Mod_Security - Get 401 Errors Out Of Relevant Status Logs! >>>>> Download LINK
>>>>> Download Now
Chriscientfic: Mod_Security - Get 401 Errors Out Of Relevant Status Logs! >>>>> Download Full
>>>>> Download LINK pJ