View Single Post
  #2  
Old 16th October 2009, 10:49
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

Quote:
Originally Posted by admins View Post
Hi all

Who has a possibility to add pureftp protection for fail2ban?

thanks
admins

This is my config that wortks under Debian Lenny and ISConfig 3:

/etc/fail2ban/jail.conf

Code:
#
# FTP servers
#

[pure-ftpd]

enabled  = true
port     = ftp
filter   = pure-ftpd
logpath  = /var/log/messages
maxretry = 3
/etc/fail2ban/filter.d/pure-ftpd.conf

This is correct failregex for Debian Lenny:

Code:
failregex = pure-ftpd(?:\[\d+\])?: \(.+?@<HOST>\) \[WARNING\] %(__errmsg)s \[.+\]$
Restart your fail2ban and now fail2ban and pure-ftpd works as it should.

You can always tweak maxretry parameter to suit your needs.
Reply With Quote