| 86 |
- |
1 |
# Fail2Ban configuration file
|
|
|
2 |
#
|
|
|
3 |
# NetBSD npf ban/unban
|
|
|
4 |
#
|
|
|
5 |
# Author: Nils Ratusznik <nils@NetBSD.org>
|
|
|
6 |
# Based on pf.conf action file
|
|
|
7 |
#
|
|
|
8 |
|
|
|
9 |
[Definition]
|
|
|
10 |
|
|
|
11 |
# Option: actionstart
|
|
|
12 |
# Notes.: command executed once at the start of Fail2Ban.
|
|
|
13 |
# Values: CMD
|
|
|
14 |
#
|
|
|
15 |
# we don't enable NPF automatically, as it will be enabled elsewhere
|
|
|
16 |
actionstart =
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
# Option: actionstop
|
|
|
20 |
# Notes.: command executed once at the end of Fail2Ban
|
|
|
21 |
# Values: CMD
|
|
|
22 |
#
|
|
|
23 |
# we don't disable NPF automatically either
|
|
|
24 |
actionstop =
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
# Option: actioncheck
|
|
|
28 |
# Notes.: command executed once before each actionban command
|
|
|
29 |
# Values: CMD
|
|
|
30 |
#
|
|
|
31 |
actioncheck =
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
# Option: actionban
|
|
|
35 |
# Notes.: command executed when banning an IP. Take care that the
|
|
|
36 |
# command is executed with Fail2Ban user rights.
|
|
|
37 |
# Tags: <ip> IP address
|
|
|
38 |
# <failures> number of failures
|
|
|
39 |
# <time> unix timestamp of the ban time
|
|
|
40 |
# Values: CMD
|
|
|
41 |
#
|
|
|
42 |
actionban = /sbin/npfctl table <tablename> add <ip>
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
# Option: actionunban
|
|
|
46 |
# Notes.: command executed when unbanning an IP. Take care that the
|
|
|
47 |
# command is executed with Fail2Ban user rights.
|
|
|
48 |
# Tags: <ip> IP address
|
|
|
49 |
# <failures> number of failures
|
|
|
50 |
# <time> unix timestamp of the ban time
|
|
|
51 |
# Values: CMD
|
|
|
52 |
#
|
|
|
53 |
# note -r option used to remove matching rule
|
|
|
54 |
actionunban = /sbin/npfctl table <tablename> rem <ip>
|
|
|
55 |
|
|
|
56 |
[Init]
|
|
|
57 |
# Option: tablename
|
|
|
58 |
# Notes.: The pf table name.
|
|
|
59 |
# Values: [ STRING ]
|
|
|
60 |
#
|
|
|
61 |
tablename = fail2ban
|