Skip to content

Instantly share code, notes, and snippets.

@pramoso
Last active June 28, 2023 23:22
Show Gist options
  • Select an option

  • Save pramoso/86195a89cd1ff76beb32bfba4e32e8e9 to your computer and use it in GitHub Desktop.

Select an option

Save pramoso/86195a89cd1ff76beb32bfba4e32e8e9 to your computer and use it in GitHub Desktop.
Config Fail2ban to use Wordpress using Cloudflare Firewall API token V4
[wordpress-hard]
enabled = true
port = http,https
filter = wordpress-hard
logpath = /var/log/auth.log
maxretry = 1
findtime = 3600
bantime = 86400
action = cloudflare-token
iptables-allports
[wordpress-soft]
enabled = true
port = http,https
filter = wordpress-soft
logpath = /var/log/auth.log
maxretry = 3
findtime = 3600
bantime = 3600
action = cloudflare-token
iptables-allports
[wordpress-extra]
enabled = true
port = http,https
filter = wordpress-extra
logpath = /var/log/auth.log
maxretry = 3
findtime = 3600
bantime = 3600
action = cloudflare-token
iptables-allports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment