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...