summary refs log tree commit diff
path: root/nixos/modules/services/networking/coturn.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/networking/coturn.nix')
-rw-r--r--nixos/modules/services/networking/coturn.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/coturn.nix b/nixos/modules/services/networking/coturn.nix
index 14e6932d868..65273a4bf93 100644
--- a/nixos/modules/services/networking/coturn.nix
+++ b/nixos/modules/services/networking/coturn.nix
@@ -320,6 +320,14 @@ in {
         RuntimeDirectory = "turnserver";
         User = "turnserver";
         Group = "turnserver";
+        AmbientCapabilities =
+          mkIf (
+            cfg.listening-port < 1024 ||
+            cfg.alt-listening-port < 1024 ||
+            cfg.tls-listening-port < 1024 ||
+            cfg.alt-tls-listening-port < 1024 ||
+            cfg.min-port < 1024
+          ) "cap_net_bind_service";
         Restart = "on-abort";
       };
     };