On 03/21/2015 10:11 AM, Yaroslav Halchenko wrote: > On Tue, 10 Mar 2015, AJ Weber wrote: > >> I'm using v0.8.14. Is there any way to do this or is there a way to >> "trick" fail2ban to do so (I tried "touching" one of the old log files, >> but fail2ban still doesn't seem to re-read that file to ban ips). > 0.9. series uses a persistent database to store those, so they will come > back in effect (get rebanned) upon reload. So you would just need to > upgrade >
I would be interested in knowing weather there are many people out there sucessfully running the 0.9.0 or 0.9.1 releases and what OS version they are running under. I tried both 0.9.0 and 0.9.1 and in both cases they worked fine for a few hours and then they would start spitting errors to the log file and stop banning. Here's a previous posting that I made describing the problems that I ran into... I have been trying to run 0.9.1 and it runs fine for a few hours, bans a few hundred hosts and then I get the following errors. After 4 errors like this, it no longer seems to be following the log files. When I first tried it I had the pyinotify package installed and I got different errors which filled up the log file. After I deinstalled pyinotify here's what I get. I do have gamin installed: gamin-python-0.1.7-10.el5 gamin-0.1.7-10.el5 This is a Centos 5 system with all updates installed, using python 2.6. My configuration is very simple (has not changed since I previously posted it) and runs fine under the stable release. Nov 23 07:11:58 myhost fail2ban[5351]: CRITICAL Unhandled exception in Fail2Ban: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/fail2ban/server/jailthread.py", line 64, in run_with_except_hook run(*args,\ **kwargs) File "/usr/lib/python2.6/site-packages/fail2ban/server/filterpoll.py", line 95, in run self.getFailures(filename) File "/usr/lib/python2.6/site-packages/fail2ban/server/filter.py", line 686, in getFailures db.upd\ ateLog(self.jail, container) File "/usr/lib/python2.6/site-packages/fail2ban/server/database.py", line 57, in wrapper return f(self, self._db.cursor(), *args, **kwargs) File "/usr/lib/python2.6/site-packages/fail2ban/server/dat\ abase.py", line 344, in updateLog self._updateLog(cur, *args, **kwargs) File "/usr/lib/python2.6/site-packages/fail2ban/server/database.py", line 351, in _updateLog jail.name, container.getFileName())) ProgrammingError: libra\ ry routine called out of sequence Nov 23 07:11:58 myhost fail2ban.actions[5351]: ERROR Failed to execute ban jail 'postfix-max1' action 'iptables-multiport' info 'CallingMap({'ipjailmatches': <function <lambda> at 0x4049d534>, 'matches': u'Nov 23 07:11:56 aspen postfix/smtpd[866]: NOQUEUE: reject: RCPT from unknown[61.16.215.242]: 550 5.7.1 Client host rejected: cannot find your hostname, [61.16.215.242]; from=<6ae56281-380a-4fc3-903a-5295ca8df...@fakafkbaekbdbfaf.newmegaspf.com> to=<ju...@harbin.org> proto=SMTP helo=<fakafkbaekbdbfaf.newmegaspf.com>', 'ip': '61.16.215.242', 'ipmatches': <function <lambda> at 0x4049d374>, 'ipfailures': <function <lambda> at 0x4049d02c>, 'time': 1416755517.95275, 'failures': 1, 'ipjailfailures': <function <lambda> at 0x4049da74>})': library routine called out of sequence Here's the errors that I get with pyinotify installed. Note that here again it ran fine and was banning hosts for a while before it started spitting out these errors: 2014-11-08 21:43:18,939 fail2ban.filterpyinotify[2584]: ERROR Error in FilterPyinotify callback: cannot commit transaction - SQL statements in progress 2014-11-08 21:43:18,940 fail2ban.actions [2584]: ERROR Failed to execute ban jail 'postfix-max1' action 'iptables-multiport' info 'CallingMap({'ipjailmatches': <function <lambda> at 0x404bb80c>, 'matches': u'Nov 8 21:43:18 myhost postfix/smtpd[4673]: NOQUEUE: reject_warning: RCPT from mail.standard4.nmgmail.com[208.82.211.227]: 554 5.7.1 Service unavailable; Client host [208.82.211.227] blocked using b.barracudacentral.org; from=<www-data+americanbotanicalpharm...@bounce.dmpemail1.com> to=<emaila...@mydomain.com> proto=ESMTP helo=<mail.standard4.nmgmail.com>', 'ip': '208.82.211.227', 'ipmatches': <function <lambda> at 0x404bb87c>, 'ipfailures': <function <lambda> at 0x404bb844>, 'time': 1415511798.8957911, 'failures': 1, 'ipjailfailures': <function <lambda> at 0x404bb6bc>})': cannot commit transaction - SQL statements in progress Thanks, Natu ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Fail2ban-users mailing list Fail2ban-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fail2ban-users