cloudpanel-io / cloudpanel-ce

1.21k stars 99 forks source link

Fail2ban not working #464

Closed TheMukeshPatel closed 3 months ago

TheMukeshPatel commented 3 months ago

CloudPanel version(s) affected

v2.4.2

Description

Fail2ban is not working on the latest CloudPanel v2.4.2 that on Ubuntu 24.

How to reproduce

Installed the latest Cloudpanel using the Installer script. On this fresh installation, Fail2ban not working.

`root@Ubuntu-24:~# systemctl status fail2ban × 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:59:15 UTC; 6min ago Duration: 289ms Docs: man:fail2ban(1) Main PID: 25572 (code=exited, status=255/EXCEPTION) CPU: 147ms

May 22 15:59:15 Ubuntu-24 systemd[1]: Started fail2ban.service - Fail2Ban Service. May 22 15:59:15 Ubuntu-24 fail2ban-server[25572]: 2024-05-22 15:59:15,478 fail2ban.configreader [25572]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto' May 22 15:59:15 Ubuntu-24 fail2ban-server[25572]: 2024-05-22 15:59:15,529 fail2ban [25572]: ERROR No module named 'asynchat' May 22 15:59:15 Ubuntu-24 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION May 22 15:59:15 Ubuntu-24 systemd[1]: fail2ban.service: Failed with result 'exit-code'. `

Possible Solution

No response

Additional Context

No response

cloudpanel-io commented 3 months ago

Not a CloudPanel bug. It's known and reported Ubuntu Bug:

https://bugs.launchpad.net/ubuntu/+source/fail2ban/+bug/2055114

cloudpanel-io commented 3 months ago

Here is a workaround:

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

https://bugs.launchpad.net/ubuntu/+source/fail2ban/+bug/2055114/comments/22

TheMukeshPatel commented 3 months ago

Thanks. It worked.