Arnaud a5d6569876
feat: nat traversal relay (#1417)
Signed-off-by: Arnaud <arno.deville@gmail.com>
Signed-off-by: Giuliano Mega <giuliano.mega@gmail.com>
Co-authored-by: Giuliano Mega <giuliano.mega@gmail.com>
2026-07-23 13:10:36 +00:00

13 lines
496 B
Bash
Executable File

#!/usr/bin/env bash
source "$(dirname "$0")/router-common.sh"
# Forward the node's TCP listen port (what AutoNAT dials back) and UDP disc port
# in order to simulate the port mapping.
iptables -t nat -A PREROUTING -i "$wanif" -p tcp --dport 8070 -j DNAT --to-destination "$NODE_IP:8070"
iptables -t nat -A PREROUTING -i "$wanif" -p udp --dport 8090 -j DNAT --to-destination "$NODE_IP:8090"
echo "router ready (forwarding tcp/8070 + udp/8090 to $NODE_IP, wan iface $wanif)"
hold_until_stopped