:: Re: [DNG] fail2ban doesn't work on …
Top Page
Delete this message
Reply to this message
Author: Nick
Date:  
To: dng
Subject: Re: [DNG] fail2ban doesn't work on Excalibur
On 11/6/25 3:23 PM, Nick Rickard via Dng wrote:
>
>> I noticed that fail2ban package doesn't work at all on Excalibur.
>
>> fail2ban                [31993]: ERROR NOK: (38, 'Function not
>> implemented')
>>   failed!
>> invoke-rc.d: initscript fail2ban, action "start" failed.
>> dpkg: error processing package fail2ban (--configure):
>
>> Anyone know how to fix this? Thank you.
> (I'm afraid this is half an answer as I'm not at the machine in
> question at the moment.)
>
> I had a similar issue and traced it to fail2ban defaulting to a
> systemd setup. Somewhere in the config files
> (/etc/fail2ban/jail.conf??) were lines like:
>
> dovecot_backend = systemd
>
> so fail2ban was trying to initiate the jails using systemd, which
> clearly failed on a Devuan system. I can't recall what I changed it
> to, possibly "auto", but that hopefully gives you somewhere to start
> looking. Upshot is that my fail2ban works in excalibur.
>

The preferred way is to use a jail.local. The supplied jail.conf
contains this note:

# "backend" specifies the backend used to get files modification.
# Available options are "pyinotify", "gamin", "polling", "systemd" and
"auto".
# This option can be overridden in each jail as well.
#
# pyinotify: requires pyinotify (a file alteration monitor) to be installed.
#              If pyinotify is not installed, Fail2ban will use auto.
# gamin:     requires Gamin (a file alteration monitor) to be installed.
#              If Gamin is not installed, Fail2ban will use auto.
# polling:   uses a polling algorithm which does not require external
libraries.
# systemd:   uses systemd python library to access the systemd journal.
#              Specifying "logpath" is not valid for this backend.
#              See "journalmatch" in the jails associated filter config
# auto:      will try to use the following backends, in order:
#              pyinotify, gamin, polling.
#
# Note: if systemd backend is chosen as the default but you enable a jail
#       for which logs are present only in its own log files, specify
some other
#       backend for that jail (e.g. polling) and provide empty value for
#       journalmatch. See
https://github.com/fail2ban/fail2ban/issues/959#issuecomment-74901200
backend = auto