changed it to do both tcp and udp

This commit is contained in:
2025-11-25 15:27:01 +02:00
parent 5e992810ea
commit e7564371ed
2 changed files with 15 additions and 1 deletions

View File

@@ -26,7 +26,8 @@ export function enqueueNatAdd(ip, port, proto='tcp') {
info(`NAT ADD ${proto} ${ip}:${port}`);
await runRouterCmds([
'conf t',
`ip nat inside source static ${proto} ${ip} ${port} interface ${process.env.ROUTER_WAN_IF || 'gi0'} ${port}`,
`ip nat inside source static tcp ${ip} ${port} interface ${process.env.ROUTER_WAN_IF || 'gi0'} ${port}`,
`ip nat inside source static udp ${ip} ${port} interface ${process.env.ROUTER_WAN_IF || 'gi0'} ${port}`,
'end',
'wr mem'
]);