Skip to content

wpkc/fail2ban-action-cloudflare-restv4

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Fail2Ban Action Configuration for CloudFlare REST API V4

Note: This will only work if you have full access to your web server's /etc/fail2ban/ files.

Installation:

  • Copy action.d/cloudflare-restv4.conf to your /etc/fail2ban/action.d directory.
  • Get your CloudFlare Global API Key at: https://dash.cloudflare.com/profile
  • Modify your /etc/fail2ban/jail.local as shown in the sample jail.local file provided in this repository. Set cfemail and cfapikey to your cloudflare account email and Global API Key respectively.
  • Restart Fail2Ban with: service fail2ban restart
  • Please consider using mod_cloudflare on Apache2 servers to make sure you are using the correct IP address as the client IP address.

More info: https://www.kazimer.com/fail2ban-action-for-cloudflare-rest-api-v4/