owasp-modsecurity / ModSecurity

ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.
https://www.modsecurity.org
Apache License 2.0
7.67k stars 1.54k forks source link

Problem with logfile's name #3084

Open sivsoft opened 3 months ago

sivsoft commented 3 months ago

I have last version Modsecurity (but with previous version was same problem). In configfile /etc/nginx/modsec/modsecurity.conf i have: SecAuditLogType Serial SecAuditLog /var/log/modsec/modsec_audit.log This file is created, but he have zero size and modsec contineuos write in file in format: modsec_audit.log-YYYYMMDD

Please help me. What could be the problem? How fix it?

airween commented 3 months ago

Hi @sivsoft,

thanks for reporting. It seems that you use libmodsecurity3, but some other information need to reproduce the issue.

Please take a look to our issue template, and fill as many item as you can.

Especially it would be important to know the settings of these options:

SecRuleEngine
SecAuditEngine
SecAuditLogRelevantStatus
SecAuditLogParts

beside the mentioned ones above.

These control what and when will sent to audit.log.

sivsoft commented 2 months ago

Sorry it took me so long to respond... I was sick Here is my system and settings

CentOS 7
Modsecurity 3.0.11
ModSecurity-nginx (owasp-modsecurity) 1.0.3
nginx 1.25.3
#SecRuleEngine On
SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus "^(?:5|4\d[^4])"
SecAuditLogParts ABIDFGHZ

Based on the logs, I don’t know what to say. There is nothing in the logs. The log just starts being written to another file, or rather the name is the same, but with the addition of the date in end.

airween commented 2 months ago

Could you provide some example how do you test your WAF? Eg. a curl request...

airween commented 2 months ago

@sivsoft ping.