feat: enable fail2ban
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
49341364a8
commit
86347a68de
4 changed files with 72 additions and 6 deletions
|
|
@ -12,6 +12,26 @@ in
|
|||
}
|
||||
];
|
||||
|
||||
services.fail2ban.jails = {
|
||||
# max 6 failures in 600 seconds
|
||||
"nginx-spam" = ''
|
||||
enabled = true
|
||||
filter = nginx-bruteforce
|
||||
logpath = /var/log/nginx/access.log
|
||||
backend = auto
|
||||
maxretry = 6
|
||||
findtime = 600
|
||||
'';
|
||||
|
||||
# max 3 failures in 600 seconds
|
||||
"postfix-bruteforce" = ''
|
||||
enabled = true
|
||||
filter = postfix-bruteforce
|
||||
findtime = 600
|
||||
maxretry = 3
|
||||
'';
|
||||
};
|
||||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.escapeangle.com";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue