networking and security updates

This commit is contained in:
Rouven Seifert 2023-11-25 23:22:16 +01:00
parent ccfcd6db3a
commit 2e8e3ada22
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
7 changed files with 29 additions and 15 deletions

View file

@ -1,4 +1,4 @@
{ ... }:
{ lib, ... }:
{
services.fail2ban = {
enable = true;
@ -7,11 +7,15 @@
enable = true;
};
jails = {
sshd = lib.mkForce ''
enabled = true
port = ssh
filter= sshd[mode=aggressive]
'';
dovecot = ''
enabled = true
# aggressive mode add blocking for aborted connections
filter = dovecot[mode=aggressive]
bantime = 10m
maxretry = 3
'';
postfix = ''

View file

@ -15,10 +15,9 @@ let
in
{
networking.firewall.allowedTCPPorts = [
25 # insecure SMTP
465
587 # SMTP
993 # IMAP
25 # SMTP
465 # SUBMISSONS
993 # IMAPS
4190 # sieve
];
users.users.rouven = {