Ban time incr

New feature "automatically exponential increasing ban time".
WARNING: by first start the server upgrades sqlite database (table "bans" will recreated with another schema);
Option "bantime.increment" in jail.conf allows to use database for searching of previously banned ip's to increase a default ban time using special formula, by default each next ban increase banTime * 1, 2, 4, 8, 16, 32...
see "jail.conf" for some other options of "bantime.___";
additional we can configure a little randomization of ban time, to prevent "clever" botnets calculate exact time IP can be unbanned.


On Thu, 19 Jun 2014, Serg G. Brester wrote:
>  > @@ -138,13 +141,13 @@ def __delFailure(self, ip):
>  >            if self.__failList.has_key(ip):
>  >                    del self.__failList[ip]

>  > -  def toBan(self):
>  > +  def toBan(self, ip = None):

>    code review shows much more lines in any modules, so searching with regex
>    for \s+=\s+[^)\n]+)\s*: says me:
>    28 matches across 19 files

I was talking about

$> git grep '^\s*def.*\s=' | wc -l 
21
$> git grep '^\s*def.*\S=' | wc -l 
63

so we are more consistent than inconsistent... thus better to improve
consistency whenever we could ;)

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,            Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik