mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
networking and security updates
This commit is contained in:
parent
ccfcd6db3a
commit
2e8e3ada22
7 changed files with 29 additions and 15 deletions
|
@ -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 = ''
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue