@staff is this a bug?
Hmmm… Not sure if this is a bug. I think somehow, one thing might not be configured well.
I have tried to change the log file path in the Proftpd settings to /var/log/proftpd.log, but for some reasons it still writes into /var/log/messages…
I also this this problem in all distros.
I will try to find the solution. I will update this ticket with progress!
Alright, starting Virtualmin-Config 7.0.11
and above Fail2ban ProFTPd jail will work properly.
You can either wait until @Joe releases a new Virtualmin-Config 7.0.11
or manually apply the patch below.
Either way, all existing installation to address this issue should run the following command:
virtualmin-config-system -i Fail2banFirewalld
Hi @Ilia,
First of all, thank you very much for this patch. I haven’t tried it yet but looking at my friend’s server, I actually solved the issue in a bit different way. What surprised me was that ProFTPd didn’t want to log to /var/log/proftpd/proftpd.log on Alma when I put the path there in the logging options in Webmin. So, I had a look at the startup script which was:
[Unit]
Description = ProFTPD FTP Server
Wants=network-online.target
After=network-online.target nss-lookup.target local-fs.target remote-fs.target
[Service]
Type = simple
Environment = PROFTPD_OPTIONS=
EnvironmentFile = -/etc/sysconfig/proftpd
ExecStartPre = /usr/sbin/proftpd --configtest
ExecStart = /usr/sbin/proftpd --nodaemon $PROFTPD_OPTIONS
ExecReload = /bin/kill -HUP $MAINPID
PIDFile = /run/proftpd/proftpd.pid
[Install]
WantedBy = multi-user.target
So I changed it to:
[Unit]
Description=ProFTPD FTP Server
Wants=network-online.target
After=network-online.target nss-lookup.target local-fs.target remote-fs.target
[Service]
Type=forking
Environment=PROFTPD_OPTIONS= CONFIG_FILE=/etc/proftpd.conf
EnvironmentFile=-/etc/sysconfig/proftpd
ExecStartPre=/usr/sbin/proftpd --configtest -c $CONFIG_FILE
ExecStart=/usr/sbin/proftpd -c $CONFIG_FILE $PROFTPD_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/run/proftpd/proftpd.pid
[Install]
WantedBy=multi-user.target
Afterwards, I commented out these lines in my ProFTPd configuration file:
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
And
LogOptions -Timestamp -Hostname +RoleBasedProcessLabels
After rebooting, it’s now working with the original Fail2Ban rule, and ProFTPd is logging to the path that I set to /var/log/proftpd/proftpd.log
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.