Port forwarding to a static route

1

I have a TP-Link router cum ADSL modem. The modem connects to BSNL broadband via telephone socket. And the ethernet port is connected to a LAN switch. The ip address of TP-Link device is 192.168.1.1. We have a static IP address on broadband. There is a server (192.168.1.50) on LAN which has docker host and it has different containers running on different subnet like 192.168.3.x to 192.168.20.x. I have static routes setup on TP-Link 'Static Routes' section and on LAN, we can connect to all containers from all devices.

QUESTIONS: When, on TP-Link, I port forward a request for WAN to a Docker container IP like 192.168.5.10, it says you cannot use this IP because it is for different subnet (because TP-Link ip is 192.168.1.1).

How can I port forward to ip address of any subnet (192.168.x.x)? In case if I need to change my hardware setup, can you also suggest a device which can port forward based on the domain name? Thank you all in advance for your assistance.

Alpesh M

Posted 2019-12-30T07:02:48.423

Reputation: 11

1As long as the new address is routable, the router should be able to port forward it. If the default firmware on the TP-Link keeps you from doing that, I'd install some open-source firmware (e.g. OpenWRT or derivates like DD-WRT) on the router where you can do that. – dirkt – 2019-12-30T09:51:27.507

Or maybe port forward to host and port forward on the host (to the container). – Tom Yan – 2019-12-30T17:33:45.573

Thank you for your help, but I managed to handle it other way. I installed nginx reverse proxy on one or my internal servers. I forwarded WAN traffic on my router to this nginx server and let it to do subsequent forwarding to intended destinations. – Alpesh M – 2019-12-31T13:57:24.377

No answers