2023-12-05 05:27:06 +01:00
|
|
|
{ config, lib, pkgs, ... }: {
|
|
|
|
networking.firewall.allowedUDPPorts = [
|
|
|
|
3478 # Headscale DERP UDP
|
|
|
|
10000 # Jitsi
|
|
|
|
];
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
80 # HTTP
|
|
|
|
443 # HTTPS
|
2023-12-21 06:09:19 +01:00
|
|
|
# 25 # SMTP (explicit TLS => STARTTLS)
|
|
|
|
# 465 # ESMTP (implicit TLS)
|
|
|
|
# 587 # ESMTP (explicit TLS => STARTTLS)
|
|
|
|
# 143 # IMAP4 (explicit TLS => STARTTLS)
|
|
|
|
# 993 # IMAP4 (implicit TLS)
|
|
|
|
# 4190 # Sieve support
|
2023-12-05 05:27:06 +01:00
|
|
|
42420 # Vintage Story
|
|
|
|
25565 # Minecraft
|
|
|
|
1443 # Headscale DERP
|
2023-12-21 06:43:40 +01:00
|
|
|
# 4443 # jitsi-jvb
|
|
|
|
# 5222 # Jitsi
|
|
|
|
# 5347 # Jitsi
|
|
|
|
# 5280 # Jitsi
|
2023-12-05 05:27:06 +01:00
|
|
|
];
|
|
|
|
|
2023-12-21 06:55:58 +01:00
|
|
|
networking.nat = {
|
|
|
|
enable = true;
|
|
|
|
internalInterfaces = [ "enp0s4" ];
|
|
|
|
externalInterface = "wireguard0"
|
|
|
|
forwardPorts = [
|
|
|
|
{ # Headscale DERP UDP
|
|
|
|
destination = "10.100.0.2:3478";
|
|
|
|
proto = "udp";
|
|
|
|
sourcePort = 3478;
|
|
|
|
}
|
|
|
|
{ # Jitsi
|
|
|
|
destination = "10.100.0.2:10000";
|
|
|
|
proto = "udp";
|
|
|
|
sourcePort = 10000;
|
|
|
|
}
|
|
|
|
{ # HTTP
|
|
|
|
destination = "10.100.0.2:80";
|
|
|
|
proto = "tcp";
|
|
|
|
sourcePort = 80;
|
|
|
|
}
|
|
|
|
{ # HTTPS
|
|
|
|
destination = "10.100.0.2:443";
|
|
|
|
proto = "tcp";
|
|
|
|
sourcePort = 443;
|
|
|
|
}
|
|
|
|
{ # Vintage Story
|
|
|
|
destination = "10.100.0.2:42420";
|
|
|
|
proto = "tcp";
|
|
|
|
sourcePort = 42420;
|
|
|
|
}
|
|
|
|
{ # Minecraft
|
|
|
|
destination = "10.100.0.2:25565";
|
|
|
|
proto = "tcp";
|
|
|
|
sourcePort = 25565;
|
|
|
|
}
|
|
|
|
{ # Headscale DERP TCP
|
|
|
|
destination = "10.100.0.2:1443";
|
|
|
|
proto = "tcp";
|
|
|
|
sourcePort = 1443;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-12-05 05:27:06 +01:00
|
|
|
}
|