diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..58dd0a2 --- /dev/null +++ b/.env.example @@ -0,0 +1,13 @@ +ROUTER_HOST=192.168.0.1 +ROUTER_USER=username +ROUTER_PASS=password + +WEBHOOK_SECRET=secret + +ROUTER_WAN_IF=gi0 + +BIND_ADDRESS=192.168.0.2 + +ADMIN_PASS=password + +PORT=3000 \ No newline at end of file diff --git a/services/natQueue.js b/services/natQueue.js index 2391e6b..6bfbd9c 100644 --- a/services/natQueue.js +++ b/services/natQueue.js @@ -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' ]);