Bug? Wildcard log is not triggered by csf?
Posted: 18 Feb 2014, 01:45
I'm just using the new option for using wildcards in logs as followed:
This makes a log entry in /var/log/httpd/domains/mydomain.nl.error.log like this:
My protection http://www.somedomain.nl banned IP: 84.12.123.123
This won't trigger csf/lfd and the ip won't get banned.
Now when I change the HTACCESS_LOG to CUSTOM1.LOG in the regexp.custom.pm and add to csf.conf:
CUSTOM1_LOG = "/var/log/httpd/domains/mydomain.nl.error.log"
then it's triggered.
Is this a bug or why is it not triggered when using HTACCESS_LOG in the regexp.custom.pm?
I checked when reloading LFD and it says:
So what is going wrong when using HTACCESS_LOG in the regexp.custom.pm?
Now we have a regexp.custom.pm like this:HTACCESS_LOG = "/var/log/httpd/error_log /var/log/httpd/domains/*.error.log"
Code: Select all
if (($config{LF_HTACCESS}) and ($lgfile eq $config{HTACCESS_LOG}) and ($line =~ /^\[\S+\s+\S+\s+\S+\s+\S+\s+\S+\] \[error\] \[client (\S+)\] My protection (.*) banned IP: (\S+)/)) {
return ("Mytrap triggered",$1,"bottrap",1,"80,443","3600");
}
My protection http://www.somedomain.nl banned IP: 84.12.123.123
This won't trigger csf/lfd and the ip won't get banned.
Now when I change the HTACCESS_LOG to CUSTOM1.LOG in the regexp.custom.pm and add to csf.conf:
CUSTOM1_LOG = "/var/log/httpd/domains/mydomain.nl.error.log"
then it's triggered.
Is this a bug or why is it not triggered when using HTACCESS_LOG in the regexp.custom.pm?
I checked when reloading LFD and it says:
Code: Select all
Watching /var/log/httpd/domains/mydomain.nl.error.log...