Я новичок в fail2ban. Я хочу настроить Fail2Ban так, чтобы он блокировал IP на один час при двух неудачных попытках входа в систему. У меня следующая установка:
/etc/fail2ban/jail.local.conf
[DEFAULT]
bantime = 3600
maxretry = 2
backend = systemd
usedns = warn
mode = normal
destemail = <MYEMAIL>
sender = <MYSENDER>
protocol = tcp
chain = <known/chain>
port = 0:65535
fail2ban_agent = Fail2Ban/%(fail2ban_version)s
...
# Choose default action. To change, just override value of 'action' with
# the interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
# globally (section [DEFAULT]) or per specific section
action = %(action_mw)s
[sshd]
# To use more aggressive sshd modes set filter parameter "mode" in jail.local:
# normal (default), ddos, extra or aggressive (combines all).
# See "tests/files/logs/sshd" or "filter.d/sshd.conf" for usage example and details.
#mode = normal
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
[dropbear]
port = ssh
logpath = %(dropbear_log)s
backend = %(dropbear_backend)s
[selinux-ssh]
port = ssh
logpath = %(auditd_log)s
На systemctl status fail2ban.service
Я вижу, что служба работает. Я предполагаю, что он использует файл jail.local.conf. Нет сообщений об ошибках. У меня нет iptables
установлены. Это необходимо? Если да, как мне настроить его с существующей настройкой fail2ban?