Subversion Repositories configs

Rev

Rev 34 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
34 - 1
#
2
# Author: Mike Rushton
3
#
39 - 4
# IMPORTANT
34 - 5
#
39 - 6
# Please set jail.local's permission to 640 because it contains your CF API key.
34 - 7
#
39 - 8
# This action depends on curl.
9
# Referenced from http://www.normyee.net/blog/2012/02/02/adding-cloudflare-support-to-fail2ban by NORM YEE
10
#
11
# To get your CloudFlare API Key: https://www.cloudflare.com/a/account/my-account
34 - 12
 
13
[Definition]
14
 
15
# Option:  actionstart
16
# Notes.:  command executed once at the start of Fail2Ban.
17
# Values:  CMD
18
#
19
actionstart =
20
 
21
# Option:  actionstop
22
# Notes.:  command executed once at the end of Fail2Ban
23
# Values:  CMD
24
#
25
actionstop =
26
 
27
# Option:  actioncheck
28
# Notes.:  command executed once before each actionban command
29
# Values:  CMD
30
#
31
actioncheck =
32
 
33
# Option:  actionban
34
# Notes.:  command executed when banning an IP. Take care that the
35
#          command is executed with Fail2Ban user rights.
36
# Tags:    <ip>  IP address
37
#          <failures>  number of failures
38
#          <time>  unix timestamp of the ban time
39
# Values:  CMD
40
#
39 - 41
actionban = curl -s -o /dev/null https://www.cloudflare.com/api_json.html -d 'a=ban' -d 'tkn=<cftoken>' -d 'email=<cfuser>' -d 'key=<ip>'
42
 
34 - 43
# Option:  actionunban
44
# Notes.:  command executed when unbanning an IP. Take care that the
45
#          command is executed with Fail2Ban user rights.
46
# Tags:    <ip>  IP address
47
#          <failures>  number of failures
48
#          <time>  unix timestamp of the ban time
49
# Values:  CMD
50
#
39 - 51
actionunban = curl -s -o /dev/null https://www.cloudflare.com/api_json.html -d 'a=nul' -d 'tkn=<cftoken>' -d 'email=<cfuser>' -d 'key=<ip>'
34 - 52
 
53
[Init]
54
 
39 - 55
# If you like to use this action with mailing whois lines, you could use the composite action
56
# action_cf_mwl predefined in jail.conf, just define in your jail:
57
#
58
# action = %(action_cf_mwl)s
59
# # Your CF account e-mail
60
# cfemail  =
61
# # Your CF API Key
62
# cfapikey =
34 - 63
 
39 - 64
cftoken =
65
 
66
cfuser =