Created
October 28, 2014 20:56
-
-
Save trepmal/d2eb189dd788a2865023 to your computer and use it in GitHub Desktop.
Replace API_KEY and EMAIL (2 instances each) with appropriate values.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fail2Ban configuration file | |
# | |
# Author: Norman Yee | |
# | |
# $Revision$ | |
# | |
[Definition] | |
# Option: actionstart | |
# Notes.: command executed once at the start of Fail2Ban. | |
# Values: CMD | |
# | |
actionstart = | |
# Option: actionstop | |
# Notes.: command executed once at the end of Fail2Ban | |
# Values: CMD | |
# | |
actionstop = | |
# Option: actioncheck | |
# Notes.: command executed once before each actionban command | |
# Values: CMD | |
# | |
actioncheck = | |
# Option: actionban | |
# Notes.: command executed when banning an IP. Take care that the | |
# command is executed with Fail2Ban user rights. | |
# Tags: <ip> IP address | |
# <failures> number of failures | |
# <time> unix timestamp of the ban time | |
# Values: CMD | |
# | |
actionban = curl -s --data "a=ban&tkn=API_KEY&email=EMAIL&key=<ip>" https://www.cloudflare.com/api_json.html | |
# Option: actionunban | |
# Notes.: command executed when unbanning an IP. Take care that the | |
# command is executed with Fail2Ban user rights. | |
# Tags: <ip> IP address | |
# <failures> number of failures | |
# <time> unix timestamp of the ban time | |
# Values: CMD | |
# | |
actionunban = curl -s --data "a=nul&tkn=API_KEY&email=EMAIL&key=<ip>" https://www.cloudflare.com/api_json.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment