Hello again,

The problem I have today is that fail2ban doesn't seem to be creating a dbfile 
- as per the subject line, `fail2ban-client get dbfile` shows "Database 
currently disabled", yet it is defined in 

   $ sudo fail2ban-client reload                                
   $ sudo fail2ban-client get dbfile
   Database currently disabled
   $ sudo fail2ban-client -d | head
   ['set', 'syslogsocket', 'auto']
   ['set', 'loglevel', 'INFO']
   ['set', 'logtarget', '/var/log/fail2ban.log']
   ['set', 'dbfile', '/var/lib/fail2ban/fail2ban.sqlite3']
   ['set', 'dbpurgeage', 260000]
   ['add', 'sshd-badusername', 'auto']
   ['set', 'sshd-badusername', 'findtime', 172800]
   ['set', 'sshd-badusername', 'ignorecommand', '']
   ['set', 'sshd-badusername', 'maxretry', 2]
   ['set', 'sshd-badusername', 'addignoreip', '127.0.0.1/8']
   $ ls /var/lib/fail2ban/
   $ ls /var/lib/fail2ban/fail2ban.sqlite3
   ls: cannot access '/var/lib/fail2ban/fail2ban.sqlite3': No such file or 
directory
   $ grep -Ri -e dbfile /etc/fail2ban/                          
   /etc/fail2ban/fail2ban.conf:# Options: dbfile
   /etc/fail2ban/fail2ban.conf:dbfile = /var/lib/fail2ban/fail2ban.sqlite3
   /etc/fail2ban/fail2ban.local:# Options: dbfile
   /etc/fail2ban/fail2ban.local:dbfile = /var/lib/fail2ban/fail2ban.sqlite3
   $ cat /etc/fail2ban/fail2ban.local
   [Definition]
   dbfile = /var/lib/fail2ban/fail2ban.sqlite3
   dbpurgeage = 260000
   $

AIUI it should need defining in only one of these files, but when searching the 
problem I found this GitHub issue: 
https://github.com/fail2ban/fail2ban/issues/1048

After seeing that I upgraded to fail2ban-0.9.7, but no difference.

I get the same thing if I stop the jails manually using fail2ban-client and try 
to set the dbfile manually with it:
   
   $ sudo bash -c 'for foo in sshd-badusername sshd-wrongpassword ; do 
fail2ban-client stop $foo ; done'
   Jail stopped                             
   Jail stopped
   $ sudo fail2ban-client set dbfile /var/lib/fail2ban/fail2ban.
   sqlite3                   
   Database currently disabled                                                  
   
   $ sudo fail2ban-client set dbpurgeage 260000                 
   Database currently disabled                                                  
   
   $

Any thoughts, please?

I'm not sure how necessary it is to have a persistent database, as fail2ban 
shows plenty of banned IP's if I restart it completely using its /etc/init.d 
script. Presumably it parses the whole log file at startup, anyway?

Stroller.




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fail2ban-users mailing list
Fail2ban-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to