forward minecraft server traffic from trantor to alexandria
This commit is contained in:
parent
37558060f4
commit
66b68ce658
3 changed files with 38 additions and 3 deletions
|
|
@ -6,11 +6,10 @@
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
80 # HTTP
|
80 # HTTP
|
||||||
443 # HTTPS
|
443 # HTTPS
|
||||||
25565 # Minecraft
|
# 25565 # Minecraft
|
||||||
];
|
];
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
24454 # Minecraft Simple Voice Chat
|
# 25565 # Minecraft
|
||||||
25565 # Minecraft
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./disko.nix
|
./disko.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./networking.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
35
hosts/modules/trantor/networking.nix
Normal file
35
hosts/modules/trantor/networking.nix
Normal 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";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue