Broken Fail2Ban version in Linode Repo for Ubuntu 24.04

The version of Fail2Ban does not work for Ubunutu 24.04 due to missing dependencies. Is there any way to update the standard Linode repos with the new version?

3 Replies

This appears to be a known bug for Ubuntu 24.04 LTS users since asynchat was removed from the upstream Python3 library. For visibility into what this looks like, here is a snippet of the systemctl status after installing Fail2Ban:

systemctl status fail2ban.service:

× fail2ban.service - Fail2Ban Service
     Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-05-22 15:50:53 UTC; 4s ago
   Duration: 112ms
       Docs: man:fail2ban(1)
    Process: 3606 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION)
   Main PID: 3606 (code=exited, status=255/EXCEPTION)

May 22 15:50:53 localhost fail2ban-server[3606]: 2024-05-22 15:50:53,483 fail2ban                [3606]: ERROR   No module named 'asynchat'

I was able to fix the issue by entering the following commands:

wget https://launchpad.net/ubuntu/+source/fail2ban/1.1.0-1/+build/28291332/+files/fail2ban_1.1.0-1_all.deb
sudo dpkg -i fail2ban_1.1.0-1_all.deb

For more information about this process, see the following blog page where I found this work-around:

That's great thank you. From a security point, an official release would be better from the standard Linode repo now that Fail2Ban have updated the version, rather than a script from a site we are not aware of?

You can resolve the Fail2Ban issue on Ubuntu 24.04 by removing the current version, adding a PPA repository with a working version, and reinstalling. Run: sudo apt remove fail2ban, sudo add-apt-repository ppa:acraig/fail2ban, sudo apt update, and sudo apt install fail2ban. This should fix the missing dependencies problem.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct