I have a raspi connected to the Internet with a wireguard roadwarrior tunnel to the office. The raspi should forward traffic at the "raspi Intranet" to the office net to a specific server. Also raspi has access to the specific server at port 3000.
"other clients in Raspi Net (port 3000)" ->"raspi:3000"-> Tunnel->office->Server:3000
As example: Raspi Intranet eth0 has 192.168.13.201,Tunnel Address wg0 has 10.10.10.15, Office Server deamon for Port 3000 has 192.168.1.5:3000
I had try this witout success:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 3000 -j DNAT --to-destination 192.168.1.5:3000
iptables -A FORWARD -p tcp -d 192.168.1.5 --dport 3000 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT