aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/ganymede/nixos.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/hosts/ganymede/nixos.nix b/hosts/ganymede/nixos.nix
index 5ceb4e6..c6d7bd1 100644
--- a/hosts/ganymede/nixos.nix
+++ b/hosts/ganymede/nixos.nix
@@ -58,6 +58,17 @@
};
};
+ # kill-switch for qbittorrent traffic
+ networking.firewall.extraCommands =
+ # bash
+ ''
+ # Allow qbittorrent traffic over wg0
+ iptables -A OUTPUT -o wg0 -m owner --uid-owner qbittorrent -j ACCEPT
+
+ # Drop qbittorrent traffic over anything else
+ iptables -A OUTPUT ! -o wg0 -m owner --uid-owner qbittorrent -j REJECT
+ '';
+
services.fail2ban.enable = true;
# merge logs from subdomains