This commit is contained in:
commit
30ce0dafc2
195 changed files with 8902 additions and 0 deletions
33
services/coturn/firewall.nix
Normal file
33
services/coturn/firewall.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.machine.coturn;
|
||||
in
|
||||
with lib; mkIf cfg.enable {
|
||||
networking.firewall = {
|
||||
interfaces.enp2s0 =
|
||||
let
|
||||
range = with config.services.coturn; [
|
||||
{
|
||||
from = min-port;
|
||||
to = max-port;
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
allowedUDPPortRanges = range;
|
||||
allowedUDPPorts = [
|
||||
3478
|
||||
5349
|
||||
];
|
||||
allowedTCPPortRanges = [ ];
|
||||
allowedTCPPorts = [
|
||||
3478
|
||||
5349
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue