summaryrefslogtreecommitdiffstats
path: root/roles/common/templates/etc/fail2ban/jail.local.j2
blob: 1cbcd88e132bee10e4823bd7b00a2814e3e66c40 (plain)
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
# {{ ansible_managed }}
# Do NOT edit this file directly!

[DEFAULT]

# Destination email address used solely for the interpolations in
# jail.{conf,local} configuration files.
destemail = admin@fripost.org

# Specify chain where jumps would need to be added in iptables-* actions
chain = fail2ban

# Choose default action.
action = %(action_)s

#
# JAILS
#

[ssh]

enabled  = true
port	 = {{ ansible_ssh_port|default('22') }}
filter	 = sshd
logpath  = /var/log/auth.log
maxretry = 5

[ssh-ddos]

enabled  = true
port     = {{ ansible_ssh_port|default('22') }}
filter   = sshd-ddos
logpath  = /var/log/auth.log
maxretry = 2


# Generic filter for pam. Has to be used with action which bans all ports
# such as iptables-allports, shorewall
[pam-generic]

enabled   = true
# pam-generic filter can be customized to monitor specific subset of 'tty's
filter	  = pam-generic
# port actually must be irrelevant but lets leave it all for some possible uses
port      = all
banaction = iptables-allports
port      = anyport
logpath   = /var/log/auth.log
maxretry  = 6