From 35f04e794154e9098804244e5c2e127f414928c8 Mon Sep 17 00:00:00 2001 From: cnst Date: Sun, 20 Jul 2025 16:47:08 +0200 Subject: [PATCH] small changes to deluge 3 --- hosts/sobotka/default.nix | 11 +++++++++++ modules/server/deluge/default.nix | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hosts/sobotka/default.nix b/hosts/sobotka/default.nix index 52f20249..ebf160c3 100644 --- a/hosts/sobotka/default.nix +++ b/hosts/sobotka/default.nix @@ -44,6 +44,17 @@ in { networking = { hostName = "sobotka"; domain = "cnst.dev"; + firewall.extraCommands = '' + # Allow LAN access to Deluge Web UI + nft add rule inet filter input ip saddr 192.168.88.0/24 tcp dport 8112 accept + + # Allow LAN access to Deluge daemon and torrent port + nft add rule inet filter input ip saddr 192.168.88.0/24 udp dport { 58846, 6881 } accept + + # Block all other access to those ports + nft add rule inet filter input tcp dport 8112 drop + nft add rule inet filter input udp dport { 58846, 6881 } drop + ''; }; powerManagement.enable = false; diff --git a/modules/server/deluge/default.nix b/modules/server/deluge/default.nix index 34c45473..0fed696b 100644 --- a/modules/server/deluge/default.nix +++ b/modules/server/deluge/default.nix @@ -47,8 +47,8 @@ in { autoStart = true; dependsOn = ["gluetun"]; ports = [ - "8112:8112" - "6881:6881" + "192.168.88.14:8112:8112" + "192.168.88.14:58846:58846" ]; extraOptions = [ "--network=container:gluetun"