Today I had to split my LAN. My ISP does not let me control the NAT/gateway enough, so I just build my own NAT behind ISP NAT. And I am trying to make it work.
I currently need to access a Raspberry Pi's SSH server from outside.
- 192.168.8.0 is LAN offered by my ISP
- 192.168.9.0 is LAN offered by a wireless NAT router model
TL-WR340G
from TP-Link
Raspberry Pi has its static IP address and is ready to go. And MUST be connected to TP-Link router
I have already configured DMZ port forwarding from outside on my ISP gateway (luckily I can control it) and I have verified, changing the IP to my laptop connected directly to ISP modem, that port forwarding works on that side.
Okay...
Then I went to TP-Link router admin and set up port forwarding to Raspberry IP address. I set up the usual: service port? 22, ip address? 192.168.9.x and double-check, protocol? tcp or both. enable? of course.
But the problem is that the wifi router will never ever forward anything to its LAN. I am sure of the cablings. I am capable of reaching Raspberry by its LAN address. I have determined that the router may be misconfigured because I connected my laptop to ISP modem, obtained a .8.x address and tried to ssh at .8.y where y is WAN IP address of TP-Link router. Crazy. Will always refuse connection.
I have tried to enable DMZ to Raspberry, so double-forwarding should occur to any port. No luck. Tried to reboot several times, but the router seems not going.
I am sure of cablings because when I did the migration I moved everything from ISP modem to the LAN ports of the TP Link and connected the WAN of TP Link to a LAN port of ISP modem. All devices behind TP Link get a correct .9.x address.
Is there something more to check on the router settings? Something I might have missed?
I am getting crazy because tomorrow I am leaving this place and need to reconnect in the future via OpenVPN. Cannot try another router, I have only this gear at this time of the day. Not controlling static routes on the ISP modem is the reason, otherwise having Raspberry on ISP modem with port forwarding made openvpn work too. But it has to work bidirectionally and transparently.