Added missing files
This commit is contained in:
17
modoboa_installer/scripts/fail2ban.py
Normal file
17
modoboa_installer/scripts/fail2ban.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
"""fail2ban related functions."""
|
||||||
|
|
||||||
|
from . import base
|
||||||
|
|
||||||
|
|
||||||
|
class Fail2ban(base.Installer):
|
||||||
|
"""Fail2ban installer."""
|
||||||
|
|
||||||
|
appname = "fail2ban"
|
||||||
|
packages = {
|
||||||
|
"deb": ["fail2ban"],
|
||||||
|
"rpm": ["fail2ban"]
|
||||||
|
}
|
||||||
|
config_files = [
|
||||||
|
"jail.d/modoboa.conf",
|
||||||
|
"filter.d/modoboa-auth.conf",
|
||||||
|
]
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Fail2Ban filter Modoboa authentication
|
||||||
|
|
||||||
|
[INCLUDES]
|
||||||
|
|
||||||
|
before = common.conf
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
failregex = modoboa\.auth: WARNING Failed connection attempt from \'<HOST>\' as user \'.*?\'$
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[modoboa]
|
||||||
|
enabled = true
|
||||||
|
port = http,https
|
||||||
|
protocol = tcp
|
||||||
|
filter = modoboa-auth
|
||||||
|
maxretry = %max_retry
|
||||||
|
bantime = %ban_time
|
||||||
|
findtime = %find_time
|
||||||
|
logpath = /var/log/auth.log
|
||||||
Reference in New Issue
Block a user