aboutsummaryrefslogtreecommitdiff
path: root/profiles/network/fail2ban.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-08-20 20:42:27 -0700
committerFranck Cuny <franck@fcuny.net>2025-08-20 20:43:32 -0700
commit552e62b8ae7f262a9246ba98142606512c018668 (patch)
tree4624c548e25082354591de613c3513931f281283 /profiles/network/fail2ban.nix
parentbump sapi to 1.2.10 (diff)
downloadinfra-552e62b8ae7f262a9246ba98142606512c018668.tar.gz
initial configuration for fail2ban
We need to ensure the firewall is enabled and let's ensure that we open the port for SSH.
Diffstat (limited to 'profiles/network/fail2ban.nix')
-rw-r--r--profiles/network/fail2ban.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/profiles/network/fail2ban.nix b/profiles/network/fail2ban.nix
new file mode 100644
index 0000000..6aa6613
--- /dev/null
+++ b/profiles/network/fail2ban.nix
@@ -0,0 +1,15 @@
+{ ... }:
+{
+ services.fail2ban = {
+ enable = true;
+ ignoreIP = [
+ "10.100.0.0/24" # wireguard
+ ];
+ bantime = "1h";
+ bantime-increment = {
+ enable = true;
+ maxtime = "168h";
+ factor = "4";
+ };
+ };
+}