forward 9090 to vm

This commit is contained in:
2026-02-28 16:34:11 +01:00
parent d57aeb9ef3
commit 476cab8c9d

View File

@@ -197,11 +197,38 @@
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
24800 #Synergy 24800 #Synergy
53317 #localsend 53317 #localsend
3390 #rdp
9090
]; ];
networking.firewall.allowedUDPPorts = [ networking.firewall.allowedUDPPorts = [
24800 #Synergy 24800 #Synergy
53317 #localsend 53317 #localsend
3390 #rdp
9090
]; ];
networking.firewall.trustedInterfaces = [ "virbr0" ];
networking.nat = {
enable = true;
internalInterfaces = [ "virbr0" ];
externalInterface = "enp75s0";
extraCommands = ''
# MASQUERADE forwarded traffic to VM so it knows how to route back
iptables -t nat -A nixos-nat-post -o virbr0 -j MASQUERADE
'';
forwardPorts = [
{
sourcePort = 9090;
proto = "tcp";
destination = "192.168.122.113:9090";
}
{
sourcePort = 9090;
proto = "udp";
destination = "192.168.122.113:9090";
}
];
};
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;