5 |
- |
1 |
# Fail2Ban action configuration file for ufw
|
|
|
2 |
#
|
|
|
3 |
# You are required to run "ufw enable" before this will have an effect.
|
|
|
4 |
#
|
|
|
5 |
# The insert position should be approprate to block the required traffic.
|
|
|
6 |
# A number after an allow rule to the application won't be much use.
|
|
|
7 |
|
|
|
8 |
[Definition]
|
|
|
9 |
|
|
|
10 |
actionstart =
|
|
|
11 |
|
|
|
12 |
actionstop =
|
|
|
13 |
|
|
|
14 |
actioncheck =
|
|
|
15 |
|
|
|
16 |
actionban = [ -n "<application>" ] && app="app <application>" ; ufw insert <insertpos> <blocktype> from <ip> to <destination> $app
|
|
|
17 |
|
|
|
18 |
actionunban = [ -n "<application>" ] && app="app <application>" ; ufw delete <blocktype> from <ip> to <destination> $app
|
|
|
19 |
|
|
|
20 |
[Init]
|
|
|
21 |
# Option: insertpos
|
|
|
22 |
# Notes.: The postition number in the firewall list to insert the block rule
|
|
|
23 |
insertpos = 1
|
|
|
24 |
|
|
|
25 |
# Option: blocktype
|
|
|
26 |
# Notes.: reject or deny
|
|
|
27 |
blocktype = reject
|
|
|
28 |
|
|
|
29 |
# Option: destination
|
|
|
30 |
# Notes.: The destination address to block in the ufw rule
|
|
|
31 |
destination = any
|
|
|
32 |
|
|
|
33 |
# Option: application
|
|
|
34 |
# Notes.: application from sudo ufw app list
|
|
|
35 |
application =
|
|
|
36 |
|
|
|
37 |
# DEV NOTES:
|
|
|
38 |
#
|
|
|
39 |
# Author: Guilhem Lettron
|
|
|
40 |
# Enhancements: Daniel Black
|