il faut configurer un peu plus la règle
This commit is contained in:
@@ -42,11 +42,15 @@ mkIf cfg.fail2ban {
|
|||||||
action = route[blocktype=blackhole]
|
action = route[blocktype=blackhole]
|
||||||
maxretry = 3
|
maxretry = 3
|
||||||
'';
|
'';
|
||||||
|
ssh-mail-whois = ''
|
||||||
|
filter = sshd
|
||||||
|
maxretry = 3
|
||||||
|
action = mail-whois[dest=${destemail}]
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/8437
|
# https://github.com/NixOS/nixpkgs/issues/8437
|
||||||
services.fail2ban.jails.ssh-iptables = "enabled = true";
|
services.fail2ban.jails.ssh-iptables = "enabled = true";
|
||||||
services.fail2ban.jails.mail-whois-lines = "enabled = true";
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user