You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/activation-manuelle/fail2ban.nix

34 lines
883 B
Nix

{ config, pkgs, ... }:
{
# Gestion de fail2ban
services = pkgs.lib.mkIf config.r6d.config-generator.fail2ban {
fail2ban = {
enable = true;
jails = {
DEFAULT = ''
# "ignoreip" can be an IP address, a CIDR mask or a DNS host
ignoreip = 127.0.0.1/8 pedro.dubronetwork.fr cube.dubronetwork.fr voyage.prunetwork.fr xray.prunetwork.fr 192.168.0.0/16 172.16.0.0/16
# 1 jour
# bantime = 86400
# 5 jours
bantime = 432000
maxretry = 3
#
# Destination email address used solely for the interpolations in
# jail.{conf,local} configuration files.
destemail = admins@dubronetwork.fr
'';
ssh-route = ''
filter = sshd
action = route[blocktype=blackhole]
maxretry = 3
'';
};
};
};
}