set up minecraft port forwarding on lunasa
This commit is contained in:
parent
7d57b2c17c
commit
189fcafde9
1 changed files with 26 additions and 0 deletions
|
@ -41,6 +41,7 @@
|
|||
443
|
||||
1935 # the RTMP port for OwnCast
|
||||
6667 # irc plaintext
|
||||
25565 # minecraft
|
||||
];
|
||||
|
||||
services.owncast = {
|
||||
|
@ -192,5 +193,30 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.tailscale.enable = true;
|
||||
networking.nftables = {
|
||||
enable = true;
|
||||
ruleset = ''
|
||||
table ip nat {
|
||||
chain PREROUTING {
|
||||
type nat hook prerouting priority dstnat; policy accept;
|
||||
iifname "enp1s0" tcp dport 25565 dnat to 100.66.105.22:25565
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = [ "enp1s0" ];
|
||||
externalInterface = "tailscale0";
|
||||
forwardPorts = [
|
||||
{
|
||||
destination = "100.66.105.22:25565";
|
||||
proto = "tcp";
|
||||
sourcePort = 25565;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue