linuxserver / fail2ban-confs

These confs are pulled into our fail2ban image: https://github.com/linuxserver/docker-fail2ban
GNU General Public License v3.0
38 stars 12 forks source link

Cloudflare-token action doesn't execute actionunban #23

Closed marcogiorgio closed 10 months ago

marcogiorgio commented 10 months ago

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 ```bash [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] ```
marcogiorgio commented 10 months ago

Closing because it's kinda being discussed here