Enable coTURN and fix the bugs present
This commit is contained in:
parent
f3c0a84ccb
commit
e595ac3931
|
@ -104,9 +104,24 @@
|
||||||
|
|
||||||
# Contabo ipv6 nameservers: "2a02:c207::1:53" "2a02:c207::2:53"
|
# Contabo ipv6 nameservers: "2a02:c207::1:53" "2a02:c207::2:53"
|
||||||
|
|
||||||
networking.firewall.enable = true;
|
# Open ports in the firewall.
|
||||||
|
networking.firewall = {
|
||||||
networking.firewall.allowedTCPPorts = [22 80 443];
|
enable = true;
|
||||||
|
allowPing = false;
|
||||||
|
allowedTCPPorts = [
|
||||||
|
22 # SSH
|
||||||
|
5349 # STUN tls
|
||||||
|
5350 # STUN tls alt
|
||||||
|
80 # http
|
||||||
|
443 # https
|
||||||
|
];
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 49152;
|
||||||
|
to = 49999;
|
||||||
|
} # TURN relay
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# networking.useNetworkd = true;
|
# networking.useNetworkd = true;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
sops.secrets."coturn-auth-secret".mode = "0440";
|
sops.secrets."coturn-auth-secret".mode = "0440";
|
||||||
sops.secrets."coturn-auth-secret".owner = config.users.users.coturn.name;
|
sops.secrets."coturn-auth-secret".owner = config.users.users.turnserver.name;
|
||||||
|
users.users.nginx.extraGroups = ["turnserver"];
|
||||||
services.coturn = {
|
services.coturn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lt-cred-mech = true;
|
lt-cred-mech = true;
|
||||||
|
@ -23,24 +28,6 @@
|
||||||
max-port = 49999;
|
max-port = 49999;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
networking.firewall = {
|
|
||||||
enable = true;
|
|
||||||
allowPing = false;
|
|
||||||
allowedTCPPorts = [
|
|
||||||
5349 # STUN tls
|
|
||||||
5350 # STUN tls alt
|
|
||||||
80 # http
|
|
||||||
443 # https
|
|
||||||
];
|
|
||||||
allowedUDPPortRanges = [
|
|
||||||
{
|
|
||||||
from = 49152;
|
|
||||||
to = 49999;
|
|
||||||
} # TURN relay
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# setup certs
|
# setup certs
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -56,7 +43,6 @@
|
||||||
security.acme.certs = {
|
security.acme.certs = {
|
||||||
"turn.gladtherescake.eu" = {
|
"turn.gladtherescake.eu" = {
|
||||||
group = "turnserver";
|
group = "turnserver";
|
||||||
allowKeysForGroup = true;
|
|
||||||
postRun = "systemctl reload nginx.service; systemctl restart coturn.service";
|
postRun = "systemctl reload nginx.service; systemctl restart coturn.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,5 +14,6 @@
|
||||||
./nextcloud
|
./nextcloud
|
||||||
./postgres
|
./postgres
|
||||||
./roundcube
|
./roundcube
|
||||||
|
./coturn
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue