Compare commits

...

2 commits

Author SHA1 Message Date
d98f4f21be
reenable minecraft server 2025-06-09 08:55:25 +02:00
6ca1b26e84
re-add snat wg serv fw rules 2025-06-09 08:40:03 +02:00
2 changed files with 3 additions and 1 deletions

View file

@ -4,7 +4,7 @@
...
}: {
services.minecraft-servers = {
enable = false;
enable = true;
eula = true;
openFirewall = true;
servers.owo = {

View file

@ -38,6 +38,7 @@
x.protocols
|> map (protocol: ''
iptables -t nat -A PREROUTING -p ${protocol} -d ${externalIp} --dport ${toString x.port} -j DNAT --to-destination ${x.destinationIp}
iptables -t nat -A POSTROUTING -p ${protocol} -d ${x.destinationIp} --dport ${toString x.port} -j SNAT --to-source 172.245.52.19
''))
|> b.concatLists
|> b.concatStringsSep "\n";
@ -48,6 +49,7 @@
x.protocols
|> map (protocol: ''
iptables -t nat -D PREROUTING -p ${protocol} -d ${externalIp} --dport ${toString x.port} -j DNAT --to-destination ${x.destinationIp} || true
iptables -t nat -D POSTROUTING -p ${protocol} -d ${x.destinationIp} --dport ${toString x.port} -j SNAT --to-source 172.245.52.19
''))
|> b.concatLists
|> b.concatStringsSep "\n";