Skip to content

Cloudflare-token action doesn't execute actionunban #23

@marcogiorgio

Description

@marcogiorgio

Hi,
I am trying to setup fail2ban with the Cloudflare-token action. I did some tests and I noticed that the action creates the firewall rules correctly when one or more IPs should be banned but it doesn't remove them when the ban is lifted.
I am also using the Opnsense rule and it works fine, so I assume this issue is only related to the Cloudflare token action.

As a side note, I've also noticed that Cloudflare is going to deprecate the firewall APIs in favour of the WAF custom rules.

Anyway this is my custom jail.local file.. Is anyone experiencing the same issue? Thanks

jail.local
[DEFAULT]
# "maxretry" is the number of failures before a host get banned.
maxretry = 1
bantime = 20s

# Apply additional actions to all bans with all jails
action  = cloudflare-token[cfzone="ZONE", cftoken="TOKEN"]
          gotify[url="URL"]

[emby-auth]
# Apply additional actions only to bans for the emby-auth jail
enabled = true
chain   = INPUT
action  = %(known/action)s
          opnsense[alias="Fail2Ban", firewall="URL", key="KEY", secret="SECRET", allow_insecure=false]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions