fail2ban for dropbear Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
DietCH
Posts: 12
Joined: Tue May 12, 2020 10:15 am

fail2ban for dropbear

Post by DietCH »

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?
User avatar
Joulinar
Posts: 2022
Joined: Sat Nov 16, 2019 12:49 am

Re: fail2ban for dropbear

Post by Joulinar »

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.

Code: Select all

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:~#
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DietCH
Posts: 12
Joined: Tue May 12, 2020 10:15 am

Re: fail2ban for dropbear

Post by DietCH »

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.
DietCH
Posts: 12
Joined: Tue May 12, 2020 10:15 am

Re: fail2ban for dropbear

Post by DietCH »

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!
Post Reply