Linode Forum Index Linode Forum
Linode Community Forums
 


Is there an alternatives to fail2ban?

Click here to go to the original topic
Goto page 1, 2  Next
 
       Linode Forum Index -> Linux Networking
Author Message
sblantipodi



Joined: 13 May 2009
Posts: 450
Location: Italy

Posted: Mon Jul 25, 2011 11:01 am    Post subject: Is there an alternatives to fail2ban?  

As title,
I always used fail2ban with my CentOS box but now with CentOS 6 I'm not able to get it to work again.

Service starts without error, all is configured ok, no error on logs but fail2ban doesn't ban anyone on my box.

Is there an alternative software to fail2ban with similar functionalities?

I need to ban IP that fails auth on squirrelmail (I have installed squirrel_logger), on php, on apache and on phpmyadmin, ah and dovecot.
Back to top  
sblantipodi



Joined: 13 May 2009
Posts: 450
Location: Italy

Posted: Mon Jul 25, 2011 3:26 pm    Post subject:  

it seems that fail2ban doesn't work with python 2.6 except for ssh...

its really sad to see a good software like this to fail in this way.
Four years without any new features, three years without a decent fix to major problem, two years and no fix to phyton compatibility problems, board is full of spam without any moderation.

Its a dead software but I don't see any alternatives.
The only one could be denyhosts but it isn't an alternatives, at all, since it only protect the ssh port.
Back to top  
waldo



Joined: 21 May 2009
Posts: 336

Posted: Mon Jul 25, 2011 4:47 pm    Post subject:  

Looks like Python 2.6 should work with the latest version of Fail2ban:

http://www.fail2ban.org/wiki/index.php/Fail2ban:Community_Portal#Python_2.6_support_.28relevant_only_for_0.8.3_and_older.29

I know on Debian 6.0, fail2ban works just fine with python 2.6.6
Back to top  
sblantipodi



Joined: 13 May 2009
Posts: 450
Location: Italy

Posted: Mon Jul 25, 2011 4:49 pm    Post subject:  

waldo wrote: Looks like Python 2.6 should work with the latest version of Fail2ban:

http://www.fail2ban.org/wiki/index.php/Fail2ban:Community_Portal#Python_2.6_support_.28relevant_only_for_0.8.3_and_older.29

I know on Debian 6.0, fail2ban works just fine with python 2.6.6

On the net I find only complaints about fail2ban and Python 2.6, the only regexpr that works ok is the one for SSH.
Probably the debian you are talking about uses only ssh protection.
Back to top  
waldo



Joined: 21 May 2009
Posts: 336

Posted: Mon Jul 25, 2011 5:16 pm    Post subject:  

That's primarily all I use it for, but as far as I can tell, the Debian guys have filters for apache, courier, exmin, gssftpd, lighttpd, pam, postfix, pure-ftpd, gmail, sasl, sieve, sshd-ddos, sshd, vsftpd, webmin-auth, wuftpd, xinetd and a few others.

Seeing how fail2ban, python 2.6 and all just worked right out of the box for me on Debian, I'm assuming the others work just fine.
Back to top  
sblantipodi



Joined: 13 May 2009
Posts: 450
Location: Italy

Posted: Tue Jul 26, 2011 5:59 am    Post subject:  

waldo wrote: That's primarily all I use it for, but as far as I can tell, the Debian guys have filters for apache, courier, exmin, gssftpd, lighttpd, pam, postfix, pure-ftpd, gmail, sasl, sieve, sshd-ddos, sshd, vsftpd, webmin-auth, wuftpd, xinetd and a few others.

Seeing how fail2ban, python 2.6 and all just worked right out of the box for me on Debian, I'm assuming the others work just fine.

can you give me some output of fail2ban-regexpr with some of your filter.d/files ?
Back to top  
waldo



Joined: 21 May 2009
Posts: 336

Posted: Tue Jul 26, 2011 7:54 am    Post subject:  

Sure:
If you download:
http://ftp.de.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.8.4.orig.tar.gz

from:
http://packages.debian.org/squeeze/fail2ban

Then dig into config/filter.d those are the same files I'm using. From what I can tell, it appears the Debian maintainer has modified the following files in the package:

action.d/iptables-multiport.conf
action.d/iptables-new.conf
action.d/mail-whois-lines.conf
action.d/iptables-all-ports.conf
jail.conf
filter.d/apache-nohome.conf
filter.d/named-refused.conf
filter.d/apache-badbots.conf
filter.d/proftpd.conf
filter.d/pure-ftpd.conf
filter.d/wuftpd.conf
filter.d/common.conf
filter.d/ssdh-ddos.conf
filter.d/pam-generic.conf
filter.d/sasl.conf
Back to top  
sblantipodi



Joined: 13 May 2009
Posts: 450
Location: Italy

Posted: Tue Jul 26, 2011 8:15 am    Post subject:  

in my case
regexpr are correct (checked with regexpr calculator for python), fail2ban is well configured and it doesn't match anything.

I have founded dozens of other users with my same problem on the net, it could be interesting to see how debian modified that files to make it work.

in any case this is a dead software since many years, its best to find a new one but the problem is that I cannot find an alternatives.
Back to top  
waldo



Joined: 21 May 2009
Posts: 336

Posted: Tue Jul 26, 2011 8:38 am    Post subject:  

Why do you say it's dead? Because it's not in constant development with regular releases?

Sure the last release was 2 years ago:
http://www.fail2ban.org/wiki/index.php/Main_Page

Perhaps it's mature and because of it's very nature doesn't need to be constantly updated. It just reads log files and runs some external commands (usually to make changes to standard firewalls, like iptables). You do have a firewall installed, right?

If you've installed fail2ban from the Centos repository and it's not working, sounds like they broke something, or the package maintainer never tested....

This is the only browsable repo I can find for Centos:
http://pkgs.repoforge.org/fail2ban/

Looks like the newest version of fail2ban available from the Centos repos is quite old

Though Fedora is current:
http://download.fedora.redhat.com/pub/epel/6/x86_64/repoview/fail2ban.html

I'd check to see what version of fail2ban got installed on your server.
Back to top  
sblantipodi



Joined: 13 May 2009
Posts: 450
Location: Italy

Posted: Tue Jul 26, 2011 9:01 am    Post subject:  

waldo wrote: Why do you say it's dead? Because it's not in constant development with regular releases?

Sure the last release was 2 years ago:
http://www.fail2ban.org/wiki/index.php/Main_Page

Perhaps it's mature and because of it's very nature doesn't need to be constantly updated. It just reads log files and runs some external commands (usually to make changes to standard firewalls, like iptables). You do have a firewall installed, right?

If you've installed fail2ban from the Centos repository and it's not working, sounds like they broke something, or the package maintainer never tested....

This is the only browsable repo I can find for Centos:
http://pkgs.repoforge.org/fail2ban/

Looks like the newest version of fail2ban available from the Centos repos is quite old

Though Fedora is current:
http://download.fedora.redhat.com/pub/epel/6/x86_64/repoview/fail2ban.html

I'd check to see what version of fail2ban got installed on your server.

I'm using the latest 0.8.4 from fedora epel
Back to top  
haus



Joined: 03 Mar 2010
Posts: 81

Posted: Tue Jul 26, 2011 9:11 am    Post subject:  

There's always the LFD component of CSF:

http://www.configserver.com/cp/csf.html

My personal favorite. And yes, it can do squirrelmail as I wrote a rule for it some time ago.
Back to top  
sblantipodi



Joined: 13 May 2009
Posts: 450
Location: Italy

Posted: Wed Jul 27, 2011 3:25 pm    Post subject:  

I solved the problem with fail2ban, there was a date problem.

I solved by editing:
/etc/fail2ban/filter.d/common.conf

and changing
__prefix_line = \s*(?:\S+ )?(?:@vserver_\S+ )?%(__daemon_combs_re)s?\s*

with this:
__prefix_line = .*?
Back to top  
GLaDOSDan



Joined: 25 Nov 2010
Posts: 23

Posted: Wed Jul 27, 2011 3:28 pm    Post subject:  

haus wrote: There's always the LFD component of CSF:

http://www.configserver.com/cp/csf.html

My personal favorite. And yes, it can do squirrelmail as I wrote a rule for it some time ago.

Agreed, I love CSF/LFD.
Back to top  
captainkrtek



Joined: 03 Aug 2011
Posts: 2
Location: Seattle, WA

Posted: Wed Aug 03, 2011 10:16 pm    Post subject:  

CSF + LFD work very well and are easily configured via their webmin module, would also highly reccomend it :D
Back to top  
node_tux



Joined: 17 Dec 2009
Posts: 10

Posted: Fri Aug 12, 2011 1:30 pm    Post subject:  

fail2ban-regex is a command line utility to test your filters against a log file.

man fail2ban-regex for usage.
Back to top  
 
       Linode Forum Index -> Linux Networking Goto page 1, 2  Next
Page 1 of 2