fix: move filter into jail settings (NixOS submodule doesn't pass string filters)

This commit is contained in:
2026-05-01 11:59:33 +00:00
parent 0370d784a0
commit bcebf18676
2 changed files with 5 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ This document outlines the development conventions for this NixOS-based infrastr
## Build & Deployment ## Build & Deployment
- **Build/Deploy:** Use `nixos-rebuild switch --flake .#<hostname>` to build and deploy the configuration for a specific host. - **Build/Deploy:** Use `nixos-rebuild switch --flake .#<hostname>` to build and deploy the configuration for a specific host.
- **CRITICAL — Validate before pushing:** Always `nix build --no-link '.#nixosConfigurations.<hostname>.config.system.build.toplevel'` (or `nh os build`) and confirm it succeeds before pushing any changes. Never push untested NixOS configs.
- **Development Shell:** Activate the development environment with `nix develop`. - **Development Shell:** Activate the development environment with `nix develop`.
## Linting & Formatting ## Linting & Formatting

View File

@@ -364,8 +364,8 @@
# SSH brute force protection (uses systemd journal backend) # SSH brute force protection (uses systemd journal backend)
sshd = { sshd = {
enabled = true; enabled = true;
filter = "sshd";
settings = { settings = {
filter = "sshd";
port = "2424"; port = "2424";
maxretry = 3; maxretry = 3;
bantime = "1h"; bantime = "1h";
@@ -375,8 +375,8 @@
# Recidive - ban repeat offenders for 1 week # Recidive - ban repeat offenders for 1 week
recidive = { recidive = {
enabled = true; enabled = true;
filter = "recidive";
settings = { settings = {
filter = "recidive";
logpath = "/var/log/fail2ban.log"; logpath = "/var/log/fail2ban.log";
bantime = "1w"; bantime = "1w";
findtime = "1d"; findtime = "1d";
@@ -387,8 +387,8 @@
# HTTP authentication failures (Traefik) # HTTP authentication failures (Traefik)
http-auth = { http-auth = {
enabled = true; enabled = true;
filter = "traefik-auth";
settings = { settings = {
filter = "traefik-auth";
port = "80,443"; port = "80,443";
logpath = "/var/log/traefik/access.log"; logpath = "/var/log/traefik/access.log";
maxretry = 5; maxretry = 5;
@@ -399,8 +399,8 @@
# HTTP scanning/attacks (Traefik) # HTTP scanning/attacks (Traefik)
http-botsearch = { http-botsearch = {
enabled = true; enabled = true;
filter = "traefik-botsearch";
settings = { settings = {
filter = "traefik-botsearch";
port = "80,443"; port = "80,443";
logpath = "/var/log/traefik/access.log"; logpath = "/var/log/traefik/access.log";
maxretry = 2; maxretry = 2;