From 1a7349ee3d8c6c0eea650c73c8d031583d46f238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S=C3=89RIE?= Date: Fri, 22 Mar 2019 11:39:20 +0100 Subject: [PATCH] fail2ban: For sshd jail, protect 2222 port too 2222 port is heavily attacked by bots like 22. --- fail2ban/templates/jail.local.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fail2ban/templates/jail.local.j2 b/fail2ban/templates/jail.local.j2 index 4c3999bc..088e85d4 100644 --- a/fail2ban/templates/jail.local.j2 +++ b/fail2ban/templates/jail.local.j2 @@ -27,6 +27,12 @@ action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(proto action = %(action_mwl)s +[sshd] +port = ssh,2222 +logpath = %(sshd_log)s +backend = %(sshd_backend)s +maxretry = 10 + {% if fail2ban_wordpress %} [wordpress-hard] enabled = true