Unable to restart fail2ban and install apps

apt list rsyslog
En train de lister... Fait
rsyslog/stable,now 8.2302.0-1 amd64  [installé, automatique]
1 Like

@martins : I guess you install Debian 12 and use this documentation.

The default backend in Fail2ban is on auto and use rsyslog but Debian 12 don’t have rsyslog. The simplest way is to install rsyslog. I guess the service start with the installation but you should verify with systemctl status rsyslog .

The second solution is to use fail2ban with the backend systemd but the default installation of Yunohost is with rsyslog (see the answer of @jarod5001 ) si i advise you to install it.

After that, i hope your problems disappear and fail2ban start.

I would try to

sudo touch /var/log/mail.log
sudo chown root:adm /var/log/mail.log

And try to restart postfix and fail2ban.
Maybe also sudo chmod 751 /var/log/mail.log

rsyslog create the files, isn’t that the case? Or am i wrong?
The configuration is in /etc/rsyslog.conf.

If it’s not the case, you’re wright but @martins must do it for the other log files (auth.log, kern.log,etc… ) i guess

Can you please be more specific about what files and what has to be done? I have never done this type of work, but I’m happy to learn about it. I just need more specific guidance to know on what issue/keywords to search for tutorials etc. thank you very much!!

Since it’s a fresh install, I would recommend starting from scratch and reinstall yunohost on the vps.
Are you confortable using the terminal?

1 Like

Did you install rsyslog? And you don’t answer if you install Debian 12 and then run the bash line to install Yunohost.
To install rsyslog :

sudo apt install rsyslog

But I agree with @jarod5001 , you don’t know if you have other problems or permissions or other packages who are missing. It’s safer to reinstall yunohost.

ok, i’m completely up for reinstalling it, since there is nothing to be lost. i was trying to find info on how to do it and i only found older posts, related to yh 11, where two ppl claimed it made a mess. what is please the best way to reinstall it then? really big thanks for staying tuned!

1 Like

I don’t have experience with VPS, my Yunohost is at home, and i don’t know if it is similar or if there are any differences. So i’ll let @jarod5001 help you.
Good luck and Welcome in the fabulous world of Yunohost :slight_smile:

Dead simple :

  • from the vps provider > reinstall debian 12
  • you’ll get by mail the ssh credentials
  • ssh to your server, paste the install script and run it. Wait till it tells you to proceed with the post install
  • you can do it from the command line but it’s easier to do it from the browser
  • you will be asked to input the user name (which will be the admin), the password, and the domain name
  • that’s it

The documentation is very clear, it will be very helpful. And if you face any issues, you are welcome to ask
https://doc.yunohost.org/en/install/hardware:vps_debian

3 Likes

With no intention to stick my nose in jarod5001’s excellent advice, I’ll chime in with a few additional points:

  • This will of course wipe your current installation. You did not install anything (important) besides Yunohost?
  • In many cases the VPS management panel allows to upload your SSH public key. It allows you to login as root via SSH before you install Yunohost
  • Debian 12 does not have curl as a default package, so apt install curl before installing Yunohost
  • Install Yunohost via curl https://install.yunohost.org | bash

Good luck!

3 Likes

here to say, thank you really a lot. reinstalling debian and then reinstalling yh is at the end the solution! this has been a great encounter w the local community and the forum. big thanks!

4 Likes

Hey guys! I got a similar problem today after updating the system packages. The fail2ban is down and it silently breaks the upgrade process of other apps.

root@y /home# yunohost service status fail2ban
configuration: broken
configuration-details:
  - 2025-03-06 13:36:48,614 fail2ban.configreader   [3645830]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto'
  - 2025-03-06 13:36:48,647 fail2ban                [3645830]: ERROR   Failed during configuration: Have not found any log file for nextcloud jail
  - 2025-03-06 13:36:48,647 fail2ban                [3645830]: ERROR   ERROR: test configuration failed
description: Protects against brute-force and other kinds of attacks from the Internet
last_state_change: 2025-03-06 13:36:36
start_on_boot: enabled
status: failed

Creating an empty file under /var/log/nextcloud/nextcloud.log solved the problem.
The path was in the /etc/fail2ban/jail.d/nextcloud.conf

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.