Update firewall.nix

This commit is contained in:
2026-05-11 19:30:15 -03:00
parent d4872894ea
commit ecd5523a94
@@ -6,7 +6,6 @@
...
}:
{
# Open ports in the firewall.
networking.firewall = {
enable = true;
@@ -21,8 +20,20 @@
9000
11000
];
trustedInterfaces = [ "tailscale0" "docker0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
allowedUDPPorts = [
config.services.tailscale.port
53
5300
7777
40000
];
extraCommands = ''
iptables -A PREROUTING -t nat -i eth0 -p TCP --dport 80 -j REDIRECT --to-port 8000
iptables -A PREROUTING -t nat -i eth0 -p TCP --dport 53 -j REDIRECT --to-port 5300
iptables -A PREROUTING -t nat -i eth0 -p UDP --dport 53 -j REDIRECT --to-port 5300
'';
};
}