From 5f02e1b8edec1c6d993361dfd1397a441fae1827 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Mon, 30 Jan 2023 18:02:09 +0100 Subject: [PATCH] Added fail2ban setup --- modoboa_installer/config_dict_template.py | 25 +++++++++++++++++++++++ run.py | 1 + 2 files changed, 26 insertions(+) diff --git a/modoboa_installer/config_dict_template.py b/modoboa_installer/config_dict_template.py index a18437d..73256d6 100644 --- a/modoboa_installer/config_dict_template.py +++ b/modoboa_installer/config_dict_template.py @@ -118,6 +118,31 @@ ConfigDictTemplate = [ } ] }, + { + "name": "fail2ban", + "values": [ + { + "option": "enabled", + "default": "true", + }, + { + "option": "config_dir", + "default": "/etc/fail2ban" + }, + { + "option": "max_retry", + "default": "20" + }, + { + "option": "ban_time", + "default": "3600" + }, + { + "option": "find_time", + "default": "30" + }, + ] + }, { "name": "modoboa", "values": [ diff --git a/run.py b/run.py index 88c7ed6..edd5720 100755 --- a/run.py +++ b/run.py @@ -22,6 +22,7 @@ from modoboa_installer import utils PRIMARY_APPS = [ "amavis", + "fail2ban", "modoboa", "automx", "radicale",