fail2ban: Fix some broken jails (socket based sshd is still broken).
This commit is contained in:
parent
2d0555e589
commit
8dd3071c89
1 changed files with 11 additions and 3 deletions
|
@ -8,10 +8,9 @@ let
|
|||
in mkIf (elem "fail2ban" cfg.services) {
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
jails = {
|
||||
jails = {
|
||||
DEFAULT = ''
|
||||
bantime = 3600
|
||||
ignoreip = 127.0.0.1
|
||||
blocktype = DROP
|
||||
logpath = /var/log/auth.log
|
||||
'';
|
||||
|
@ -59,7 +58,16 @@ in mkIf (elem "fail2ban" cfg.services) {
|
|||
bantime = 7200
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."fail2ban/filter.d/sshd-ddos.conf" = {
|
||||
enable = (active "openssh");
|
||||
text = ''
|
||||
[Definition]
|
||||
failregex = sshd(?:\[\d+\])?: Did not receive identification string from <HOST>$
|
||||
ignoreregex =
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc."fail2ban/filter.d/postfix-sasl.conf" = {
|
||||
enable = (active "mailserver");
|
||||
|
|
Loading…
Reference in a new issue