1 { pkgs, lib, config, hosts, ... }:
3 services.openssh.logLevel = "VERBOSE";
4 services.postgresql.logLinePrefix = "%h ";
6 systemd.services.nftables.postStart = '' systemctl reload fail2ban '';
10 banaction = "nftables-multiport";
11 banaction-allports = "nftables-allports";
15 formula = "ban.Time * (1 << min(ban.Count, 20)) * banFactor";
21 packageFirewall = pkgs.nftables;
32 hosts.mermet._module.args.ipv4
33 "losurdo.sourcephile.fr"
54 environment.etc."fail2ban/action.d/nftables-common.local".text = ''
58 environment.etc."fail2ban/filter.d/postgresql.local".text = ''
62 _daemon = postgresql-start
64 journalmatch = _SYSTEMD_UNIT=postgresql.service + _COMM=postgres
65 prefregex = ^<F-MLFID>%(__prefix_line)s</F-MLFID><F-CONTENT>.+</F-CONTENT>$
66 failregex = ^<HOST>\s+FATAL:\s*no pg_hba.conf entry for host.+$
67 ^<HOST>\s+FATAL:\s*no PostgreSQL user name specified in startup packet.+$
68 ^<HOST>\s+FATAL:\s*password authentication failed for user.+$
69 ^<HOST>\s+FATAL:\s*unsupported frontend protocol.+$
71 #ignoreregex = duration: