summaryrefslogtreecommitdiff
path: root/config/networking/services/igmpproxy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/networking/services/igmpproxy.nix')
-rw-r--r--config/networking/services/igmpproxy.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/config/networking/services/igmpproxy.nix b/config/networking/services/igmpproxy.nix
new file mode 100644
index 0000000..3d7fb9c
--- /dev/null
+++ b/config/networking/services/igmpproxy.nix
@@ -0,0 +1,17 @@
+{ config, pkgs, ... }:
+
+let nets = config.personal.networking.networks;
+ conf = pkgs.writeText "igmpproxy.conf" ''
+ phyint ${nets.wan.interface} upstream ratelimit 0 threshold 1
+ phyint ${nets.iot.interface} downstream ratelimit 0 threshold 1
+ phyint ${nets.lan.interface} downstream ratelimit 0 threshold 1
+ '';
+in {
+ systemd.services.igmpproxy = {
+ description = "Multicast router utilizing IGMP forwarding";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ path = [ pkgs.igmpproxy ];
+ script = "igmpproxy -vv -n ${conf}";
+ };
+}