-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Unable to turn off writing to the server log even set to nolog,noauditlog
#2698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For myself, I just comment out function body of So, I make a feature request in owasp-modsecurity/ModSecurity-nginx#274. |
nolog,noaudilog
nolog,noauditlog
I am not intending to re-compile the whole module as I am using k8s ingress modsecurity. I am just wondering any |
Hello @Taymindis , Thanks for the report. I expect that your use case is a little unusual. Typically, having ModSecurity deny a transaction would be considered sufficiently of interest that admins would want an entry in the web server's error.log. In any case, this does seem like it has a been an bug/anomaly in libmodsecurity since the beginning of ModSecurity v3. I don't immediately have a good alternative or workaround. If I think of one, I will let you know. |
I've just run into this issue, I'm using a deny rule as a healthcheck and I don't want it logged every 2 seconds
The load balancer is happy when it sees a 403 for this which is great because I know nginx & modsecurity are both working, but I don't want it logged. Amusingly I've also just tried setting status:418 and changing the RelevantLog regexp to exclude 404 & 418 but that would appear to be for the auditlog only, which ctl:auditEngine=off has disabled. Not having a full audit of every health check is a good start but it's still filling up my error_log. |
Hi @klypnick , For your use case, one option you could consider is to change the error logging level (in your nginx config) only for that health check location. For example, something like:
|
Hi, I wrote a antidos system but as explained in this issue, it keeps spamming in the error log. If you read the code you will see in every condition something like this /* warn */
trans->m_rulesMessages.push_back(*ruleMessage);
/* error */
if (!ruleMessage->m_isDisruptive) {
trans->serverLog(ruleMessage);
}
Am I missing something? Are there other functions using the callback? I can't replicate the problem creating a callback in the |
Nvm
The
I'll report it to the other issue page |
Describe the bug
I have set this to return status 418 but i do not want any logs inside the nginx
But it somehow show error log in nginx.
The text was updated successfully, but these errors were encountered: