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.

3
  • 1
    As 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
    Commented Dec 30, 2019 at 9:51
  • Or maybe port forward to host and port forward on the host (to the container).
    – Tom Yan
    Commented Dec 30, 2019 at 17:33
  • 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
    Commented Dec 31, 2019 at 13:57

0

You must log in to answer this question.

Browse other questions tagged .