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

  • 1
    Try to apt-get purge fail2ban to completely remove the configs and then install again. – sebix Aug 19 '15 at 19:15
  • As I wrote in the original post, I've tried that. Thanks though – jblz Aug 20 '15 at 19:37
  • But you missed the outputs of all the commands. – sebix Aug 20 '15 at 19:42

I have a similar problem with some configs and I just solved it. Try to get them from:


You can copy jail.conf and fail2ban.conf to /etc/fail2ban

There are other many other sources in folders action.d/ and filter.d/ and you can copy then into /etc/fail2ban/ corresponding folder (as you said).


I fix the issue with :

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

apt-get install fail2ban

You should list your files in /etc/fail2ban:

ls -lh /etc/fail2ban

There should be a jail.conf and fail2ban.conf along with their respective jail.d , fail2ban.d, filter.d and action.d directories for the .conf files.

filter.d and action.d should be populated with several default .conf files for different services.

The error is telling you there are no files.

Also, what do you have in /var/log/fail2ban.log ?


Download the files you need directly from GitHub.

cd /etc/fail2ban/
wget https://raw.githubusercontent.com/fail2ban/fail2ban/0.11/config/fail2ban.conf
wget https://raw.githubusercontent.com/fail2ban/fail2ban/0.11/config/jail.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.