Fail2ban - bans properly, but doesn't unban

I am trying to setup fail2ban on my server, which exposes my Vaultwarden instance over the Cloudflare Tunnel. It’s setup with the “action = Cloudflare” in the jail config and my e-mail and API key setup in Cloudflare.conf as well.
When testing, the banning procedure - albeit slightly delayed, thus practically giving a potential brute forcer more attempts than expected - works. But when it’s time to unban, it fails with the following message in the fail2ban log:

2022-03-02 21:24:51,567 fail2ban.actions        [26468]: NOTICE  [vaultwarden] Unban this.is.my.ip
2022-03-02 21:24:52,968 fail2ban.utils          [26468]: Level 39 aeb890 -- exec: curl -s -o /dev/null -X DELETE -H 'X-Auth-Email: [email protected]' -H 'X-Auth-Key: this.is.my.auth.key' \
https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/$(curl -s -X GET -H 'X-Auth-Email: [email protected]' -H 'X-Auth-Key: this.is.my.auth.key' \
'https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules?mode=block&configuration_target=ip&configuration_value=this.is.my.ip&page=1&per_page=1' | cut -d'"' -f6)
2022-03-02 21:24:52,969 fail2ban.utils          [26468]: ERROR   aeb890 -- returned 3
2022-03-02 21:24:52,969 fail2ban.actions        [26468]: ERROR   Failed to execute unban jail 'vaultwarden' action 'cloudflare' info 'ActionInfo({'ip': 'this.is.my.ip', 'family': 'inet4', 'ip-rev': 'some.other.ip.idk.', 'ip-host': 'this-is-my-hostname', 'fid': 'this.is.my.ip', 'failures': 3, 'time': 1646249042.0, 'matches': '[2022-03-02 20:24:01.045][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]\n[2022-03-02 20:24:01.907][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]\n[2022-03-02 20:24:02.680][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]', 'restored': 0, 'F-*': {'matches': [('[', '2022-03-02 20:24:01.045', '][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: th[email protected]'), '[2022-03-02 20:24:01.907][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]', '[2022-03-02 20:24:02.680][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]'], 'failures': 3, 'ip4': 'this.is.my.ip'}, 'ipmatches': '[2022-03-02 20:24:01.045][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]\n[2022-03-02 20:24:01.907][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]\n[2022-03-02 20:24:02.680][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]', 'ipjailmatches': '[2022-03-02 20:24:01.045][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]\n[2022-03-02 20:24:01.907][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]\n[2022-03-02 20:24:02.680][vaultwarden::api::identity][ERROR] Username or password is incorrect. Try again. IP: this.is.my.ip. Username: [email protected]', 'ipfailures': 3, 'ipjailfailures': 3})': Error unbanning this.is.my.ip

What could that be caused by?

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