Linux – ERROR Found no accessible config files for ‘fail2ban’ under /etc/fail2ban

aptfail2banlinuxUbuntu

So my fail2ban wasn't working and in attempts to make it work the config files got messy. Decided to start from scratch.

I ran these as sudo

apt-get remove fail2ban

apt-get purge fail2ban

rm -r /etc/fail2ban

In hopes I'd completely remove it as the first two commands kept the messy config files.

So now when I apt-get install fail2ban it downloads and installs the package, however has this when I try to run it

 * Starting authentication failure monitor fail2ban                                                                                                                                                                            ERROR  Found no accessible config files for 'fail2ban' under /etc/fail2ban
ERROR  No section: 'Definition'
ERROR  No section: 'Definition'
ERROR  Found no accessible config files for 'fail2ban' under /etc/fail2ban
ERROR  Found no accessible config files for 'jail' under /etc/fail2ban
ERROR  No section: 'Definition'
ERROR  No section: 'Definition'

These config files are indeed missing. Why aren't they recreated when I reinstalled F2B? How can I start from scratch and reinstall it as default?

I'm using Ubuntu 14.04.2 LTS

Best Answer

I fix the issue with :

service fail2ban stop
rm -r /etc/fail2ban/
apt-get purge fail2ban

apt-get install fail2ban