I've been searching the forums and can't quite find the answer.
I have an openwrt router on one location which gets internet from a separate 3g router (CG-NAT). The IP of pptp client router is 192.168.0.2 and the main router (with the 3g stick) is on 192.168.0.1. I've set up a pptp wan connection to a pptp server of my own (router 10.0.0.20, server 10.0.0.1). Now, I've managed to access the ssh of the remote router when I connect to 10.0.0.20:22 by setting the following rules:
config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp udp' option src_dport '222' option dest_ip '192.168.0.2' option dest_port '222' option name 'Router SSH' config rule option target 'ACCEPT' option src 'wan' option proto 'tcp udp' option dest_port '222' option name 'Router SSH'
However, my intention is to access a web ui of a server on the same net as this router on port 80. I've tried setting up a redirect:
config redirect option target 'DNAT' option src 'wan' option dest 'lan' option proto 'tcp udp' option src_dport '8080' option dest_ip '192.168.0.20' option dest_port '80' option name 'WEB'
But it won't work. Each time I try accessing 10.0.0.20:8080 nothing happens, the port is not forwarded.
I'm trying to bypass the CG-NAT by using a VPN server I run, but I'm doing something wrong. How can I set up the second router to allow port forwarding to LAN address:port