forward minecraft server traffic from trantor to alexandria

This commit is contained in:
William 2025-06-01 17:53:46 -03:00
parent 37558060f4
commit 66b68ce658
3 changed files with 38 additions and 3 deletions

View file

@ -0,0 +1,35 @@
{ ... }:
{
networking = {
firewall = {
allowedTCPPorts = [ 25565 ];
allowedUDPPorts = [
25565
19132
];
};
nat = {
enable = true;
externalInterface = "enp0s6";
internalInterfaces = [ "tailscale0" ];
forwardPorts = [
{
sourcePort = 25565;
proto = "tcp";
destination = "alexandria:25565";
}
{
sourcePort = 25565;
proto = "udp";
destination = "alexandria:25565";
}
{
sourcePort = 19132;
proto = "udp";
destination = "alexandria:19132";
}
];
};
};
}