Alan Orth
b66c724109
This mostly copies the Debian 11 nftables setup and includes a play to clean up the old firewalld settings, timers, etc.
17 lines
598 B
Django/Jinja
17 lines
598 B
Django/Jinja
[sshd]
|
|
enabled = true
|
|
# See: /etc/fail2ban/filter.d/sshd.conf
|
|
filter = sshd
|
|
{% if (ansible_distribution == 'Debian' and ansible_distribution_major_version is version('11', '>=')) or (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '>=')) %}
|
|
# Integrate with nftables
|
|
banaction=nftables[type=allports]
|
|
{% else %}
|
|
# Integrate with firewalld and ipsets
|
|
banaction = firewallcmd-ipset
|
|
{% endif %}
|
|
backend = systemd
|
|
maxretry = {{ fail2ban_maxretry }}
|
|
findtime = {{ fail2ban_findtime }}
|
|
bantime = {{ fail2ban_bantime }}
|
|
ignoreip = {{ fail2ban_ignoreip }}
|