Repository navigation
Expand file tree
/
Copy pathdnsbl.conf
More file actions
90 lines (80 loc) · 2.55 KB
/
Copy pathdnsbl.conf
File metadata and controls
90 lines (80 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Fail2Ban configuration file
#
# Report IPs to dnsbl.io (https://dnsbl.io/)
#
# You MUST configure at least:
# <dnsbl_account> (your dnsbl.io account name).
# <dnsbl_list> (the name of your DNSBL).
# <dnsbl_key> (your dnsbl.io API key)
#
# Use this action in jail.conf like this:
# action = dnsbl
[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 <dnsbl_curl_options> -H"x-api-token: <dnsbl_key>" -XPUT <dnsbl_api_url>/<dnsbl_account>/<dnsbl_list>/<ip>
# 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 <dnsbl_curl_options> -H"x-api-token: <dnsbl_key>" -XDELETE <dnsbl_api_url>/<dnsbl_account>/<dnsbl_list>/<ip>
[Init]
# Option: dnsbl_account
# Notes.: Your dnsbl.io account name.
# MUST be provided either in the jail config or in a .local file.
# Register at https://dnsbl.io/signup
# Values: STRING
# Default: (empty)
#
dnsbl_account = mycompany
# Option: dnsbl_list
# Notes.: The name of the DNSBL.
# MUST be provided either in the jail config or in a .local file.
# Values: STRING
# Default: (empty)
#
dnsbl_list = spam
# Option: dnsbl_key
# Notes.: The API key of your dnsbl.io account.
# MUST be provided either in the jail config or in a .local file.
# Values: STRING
# Default: (empty)
#
dnsbl_key = 00000000000000000000000000000000
# Option: dnsbl_curl_options
# Notes.: The option to be passed to curl.
# Values: STRING
# Default: --silent --show-error --retry 3 --connect-timeout 10 --max-time 60 --user-agent Fail2Ban
#
dnsbl_curl_options = --silent --show-error --retry 3 --connect-timeout 10 --max-time 60 --user-agent Fail2Ban
# Option: dnsbl_api_url
# Notes.: The URL of the dnsbl.io API.
# Values: STRING
# Default: http://api.dnsbl.io/
#
dnsbl_api_url = http://api.dnsbl.io/