HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Ubuntu-9.04 - fail2ban configuration problems (http://www.howtoforge.com/forums/showthread.php?t=34886)

dudez 12th May 2009 15:40

Ubuntu-9.04 - fail2ban configuration problems
 
Hi

I have followed the guide on ISPconfig 3 for Ubuntu-9.04

Everything works perfect, but I have some problems with fail2ban and I have tried everthing I can think of.

# /etc/init.d/fail2ban restart
* Restarting authentication failure monitor fail2ban [ OK ]

But if I look in the log file I have errors:
-----------------------------------------
2009-05-12 15:34:19,688 fail2ban.jail : INFO Jail 'ssh' stopped
2009-05-12 15:34:19,690 fail2ban.server : INFO Exiting Fail2ban
2009-05-12 15:34:20,154 fail2ban.server : INFO Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.3
2009-05-12 15:34:20,155 fail2ban.jail : INFO Creating new jail 'ssh'
2009-05-12 15:34:20,155 fail2ban.jail : INFO Jail 'ssh' uses poller
2009-05-12 15:34:20,176 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,177 fail2ban.filter : INFO Added logfile = /var/log/auth.log
2009-05-12 15:34:20,178 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,178 fail2ban.filter : INFO Set maxRetry = 5
2009-05-12 15:34:20,179 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,180 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,181 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,181 fail2ban.filter : INFO Set findtime = 600
2009-05-12 15:34:20,182 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,182 fail2ban.actions: INFO Set banTime = 600
2009-05-12 15:34:20,183 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,189 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,194 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,201 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,209 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,217 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,228 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,242 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,258 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,305 fail2ban.jail : INFO Creating new jail 'apache'
2009-05-12 15:34:20,305 fail2ban.jail : INFO Jail 'apache' uses poller
2009-05-12 15:34:20,321 fail2ban.filter : INFO Added logfile = /var/log/apache2/error.log
2009-05-12 15:34:20,323 fail2ban.filter : INFO Set maxRetry = 5
2009-05-12 15:34:20,325 fail2ban.filter : INFO Set findtime = 600
2009-05-12 15:34:20,326 fail2ban.actions: INFO Set banTime = 600
2009-05-12 15:34:20,417 fail2ban.jail : INFO Jail 'ssh' started
2009-05-12 15:34:20,419 fail2ban.server : ERROR Unexpected communication error
2009-05-12 15:34:20,476 fail2ban.jail : INFO Jail 'apache' started
2009-05-12 15:34:20,493 fail2ban.server : ERROR Unexpected communication error

Can you please help me?
Thanks in advance.

dudez 13th May 2009 11:44

Solution for Ubuntu 9.04

#apt-get install python2.5

Change the python version there execute the fail2ban-server script.

/usr/bin/fail2ban-server (edit)

Change the first line from:
#!/usr/bin/python
--> to
#!/usr/bin/python2.5

After that restart fail2ban
# /etc/init.d/fail2ban restart

/var/log/fail2ban.log

2009-05-12 13:26:39,809 fail2ban.server : INFO Changed logging target to /var$
2009-05-12 13:26:39,810 fail2ban.jail : INFO Creating new jail 'ssh'
2009-05-12 13:26:39,811 fail2ban.jail : INFO Jail 'ssh' uses poller
2009-05-12 13:26:39,865 fail2ban.filter : INFO Added logfile = /var/log/auth.$
2009-05-12 13:26:39,866 fail2ban.filter : INFO Set maxRetry = 6
2009-05-12 13:26:39,868 fail2ban.filter : INFO Set findtime = 600
2009-05-12 13:26:39,869 fail2ban.actions: INFO Set banTime = 600
2009-05-12 13:26:40,058 fail2ban.jail : INFO Jail 'ssh' started

xdanx 7th February 2010 23:26

Thx a lot mate! Worked like a charm.


All times are GMT +2. The time now is 06:42.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.