Hi,
I’m new at using DietPi and have version 6.3.
I added the fail2ban software from dietpi-software because I wanted to monitor my open SSH port (22) with the default dropbear server.
When I check /var/log/fail2ban.log I get the following error:
fail2ban.jail [1007]: ERROR Backend ‘systemd’ failed to initialize due to No module named systemd
then on the next line dropbear failed to initialize as well:
fail2ban.jail [1007]: ERROR Failed to initialize any backed for Jail ‘dropbear’
I have read on https://github.com/fail2ban/fail2ban/issues/1150 that it was due to a difference in python version being used (2 vs 3), but I have no idea how to fix this.
Did someone have this already? How did you get fail2ban to work with dropbear?
Hi,
many thanks for your report. Usually F2B should work out of the box with dropbear. There is nothing to configure. I installed F2B on a demo system and it’s running without issues. For testing purposes I did a failed login, that is shown correctly on the interface.
root@DietPi3:~# fail2ban-client status dropbear
Status for the jail: dropbear
|- Filter
| |- Currently failed: 1
| |- Total failed: 1
| `- Journal matches:
`- Actions
|- Currently banned: 0
|- Total banned: 0
`- Banned IP list:
root@DietPi3:~#
Thank you Joulinar for your quick reply.
Maybe I messed up something on my system? I will try to reinstall the image again fresh and test fail2ban immediately after that and report back.
So, it was my error. Everything works out of the box (ie: immediately installing fail2ban after a fresh DietPi install).
It must have been another program that needed Python2 that screwed up the system. I am going to check every new package that I install from now on.
Thanks again for the quick reply!