2024-11-20 05:46:40 +01:00
|
|
|
{ config, ... }:
|
2024-11-20 05:46:39 +01:00
|
|
|
{
|
|
|
|
services.coturn = {
|
|
|
|
enable = true;
|
|
|
|
min-port = 49200;
|
|
|
|
max-port = 49500;
|
|
|
|
use-auth-secret = true;
|
|
|
|
static-auth-secret-file = "/secrets/static-auth-secret.secret";
|
|
|
|
realm = "turn.nekover.se";
|
2024-11-20 05:46:40 +01:00
|
|
|
cert = "${config.security.acme.certs."turn.nekover.se".directory}/fullchain.pem";
|
|
|
|
pkey = "${config.security.acme.certs."turn.nekover.se".directory}/key.pem";
|
2024-11-20 05:46:39 +01:00
|
|
|
no-tcp-relay = true;
|
2024-11-20 05:46:40 +01:00
|
|
|
no-cli = true;
|
|
|
|
extraConfig = ''
|
2024-11-20 05:46:39 +01:00
|
|
|
external-ip=170.133.2.81/10.202.41.118
|
|
|
|
prometheus
|
|
|
|
syslog
|
|
|
|
|
|
|
|
no-tlsv1
|
|
|
|
no-tlsv1_1
|
|
|
|
|
|
|
|
denied-peer-ip=10.0.0.0-10.255.255.255
|
|
|
|
denied-peer-ip=192.168.0.0-192.168.255.255
|
|
|
|
denied-peer-ip=172.16.0.0-172.31.255.255
|
|
|
|
|
|
|
|
no-multicast-peers
|
|
|
|
denied-peer-ip=0.0.0.0-0.255.255.255
|
|
|
|
denied-peer-ip=100.64.0.0-100.127.255.255
|
|
|
|
denied-peer-ip=127.0.0.0-127.255.255.255
|
|
|
|
denied-peer-ip=169.254.0.0-169.254.255.255
|
|
|
|
denied-peer-ip=192.0.0.0-192.0.0.255
|
|
|
|
denied-peer-ip=192.0.2.0-192.0.2.255
|
|
|
|
denied-peer-ip=192.88.99.0-192.88.99.255
|
|
|
|
denied-peer-ip=198.18.0.0-198.19.255.255
|
|
|
|
denied-peer-ip=198.51.100.0-198.51.100.255
|
|
|
|
denied-peer-ip=203.0.113.0-203.0.113.255
|
|
|
|
denied-peer-ip=240.0.0.0-255.255.255.255
|
|
|
|
|
|
|
|
allowed-peer-ip=10.202.41.118
|
|
|
|
|
|
|
|
user-quota=12
|
|
|
|
total-quota=1200
|
2024-11-20 05:46:40 +01:00
|
|
|
'';
|
2024-11-20 05:46:39 +01:00
|
|
|
};
|
|
|
|
}
|