]> git.somenet.org - root/pub/somesible.git/blob - roles/base/network/files/default/fail2ban.jail.local
[roles/base/network] setup networking and firewall (nftables) and fail2ban
[root/pub/somesible.git] / roles / base / network / files / default / fail2ban.jail.local
1 #
2 ################################################
3 ### Managed by someone's ansible provisioner ###
4 ################################################
5 # Part of: https://git.somenet.org/root/pub/somesible.git
6 # 2017-2025 by someone <someone@somenet.org>
7 #
8
9 [DEFAULT]
10 banaction  = nftables[type=allports]
11 ignoreself = true
12
13 findtime   = 8h
14 maxretry   = 5
15
16 bantime    = 5m
17 bantime.increment = true
18 bantime.maxtime = 4w
19
20
21 # prevent being abused for possible amplification attacks:
22 #   retrying too much after already being banned leads to an additional "drop" ban.
23 [repeated-offenders]
24 enabled    = true
25 # for some weird reason we need to define chain somewhere else than table + priority. - bug?
26 #banaction  = nftables[type=allports, table=f2b-table-roff, chain=f2b-chain-roff, chain_priority=-2, blocktype="counter log prefix \"NFT:f2b-chain:DROP-banned; \" drop"]
27 chain=f2b-chain-roff
28 banaction  = nftables[type=allports, chain=f2b-chain-roff-ignored, chain_priority=-2, blocktype=counter log prefix \"NFT:f2b-chain:DROP-banned\; \" drop]
29 logpath    = /var/log/syslog
30
31 findtime   = 1d
32 maxretry   = 100
33
34 bantime    = 10m
35
36
37 [sshd]
38 enabled    = true
39 mode       = extra