]> 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-2024 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    = 15m
17 bantime.increment = true
18
19
20 # prevent being abused for possible amplification attacks:
21 #   retrying too much after already being banned leads to an additional "drop" ban.
22 [repeated-offenders]
23 enabled    = true
24 # for some weird reason we need to define chain somewhere else than table + priority. - bug?
25 #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"]
26 chain=f2b-chain-roff
27 banaction  = nftables[type=allports, chain=f2b-chain-roff-ignored, chain_priority=-2, blocktype=counter log prefix \"NFT:f2b-chain:DROP-banned\; \" drop]
28 logpath    = /var/log/syslog
29
30 findtime   = 1d
31 maxretry   = 100
32
33 bantime    = 1d
34
35
36 [sshd]
37 enabled    = true
38 mode       = extra