VSFTP lfd banning does not work for the first 9 days of a month

This forum is only for reproducible bugs with csf and lfd (i.e. not iptables problems, lack of understanding how to use a feature, etc). Posts must be accompanied with full technical details of the problem and how it can be recreated. Any posts not adhering to this, or not considered bugs, will be moved to the General Discussion (csf) forum.
1 post Page 1 of 1
clst
Junior Member
Posts: 2
Joined: 08 Aug 2014, 11:35


Hi,

On my system (Debian 7) the day is padded with a space when the day is a single digit.
Then this line #262 in RegexMain.pm will not match:
Code: Select all
if (($config{LF_FTPD}) and ($globlogs{FTPD_LOG}{$lgfile}) and ($line =~ /^\S+ \S+ \d+ \S+ \d+ \[pid \d+] \[(\S+)\] FAIL LOGIN: Client "(\S+)"/)) {
Might be a typo. It works for all two digit days.

I changed it like that and it works:
Code: Select all
^\S+ \S+\s+\d+ \S+ \d+ \[pid \d+] \[(\S+)\] FAIL LOGIN: Client "(\S+)"
Example:
Code: Select all
does not match:
Wed Nov  2 16:33:56 2016 [pid 1] [usrname] FAIL LOGIN: Client "0.0.0.0"
works:
Wed Oct 31 16:33:56 2016 [pid 1] [usrname] FAIL LOGIN: Client "0.0.0.0"
1 post Page 1 of 1