Add fail2ban config for traefik

This commit is contained in:
Evie Litherland-Smith 2023-05-16 11:24:19 +01:00
parent 62868f9906
commit 45eb1526dc

View file

@ -1,5 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ ./fail2ban.nix ];
services.traefik = { services.traefik = {
enable = true; enable = true;
staticConfigOptions = { staticConfigOptions = {
@ -24,4 +25,10 @@
}; };
}; };
networking.firewall = { enable = true; allowedTCPPorts = [ 80 443 8080 ]; }; networking.firewall = { enable = true; allowedTCPPorts = [ 80 443 8080 ]; };
services.fail2ban.jails.traefik = ''
enabled = true
filter = traefik-auth
ports = http,https,8080
backend = systemd
'';
} }