refactor: streamline core modules into dedicated folder
This commit is contained in:
parent
b429e6468f
commit
01bcc9ecad
12 changed files with 27 additions and 28 deletions
27
modules/core/fail2ban.nix
Normal file
27
modules/core/fail2ban.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
ignoreIP = [
|
||||
"141.30.0.0/16"
|
||||
"141.76.0.0/16"
|
||||
];
|
||||
bantime-increment = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
jails = {
|
||||
dovecot = ''
|
||||
enabled = true
|
||||
# aggressive mode to add blocking for aborted connections
|
||||
filter = dovecot[mode=aggressive]
|
||||
maxretry = 3
|
||||
'';
|
||||
postfix = ''
|
||||
enabled = true
|
||||
filter = postfix[mode=aggressive]
|
||||
maxretry = 3
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue