-5

Say I have Server 1 and Server 2, both are in charge of running a variety different services (Web-services, file hosting, etc.). Both servers servers are linked together by a D-Link DAP 1522, which serves as a gateway to the rest of the network, controlled by a Linksys WGA600N. I am planning on allowing outside access to these servers as well.

How would you set up the network, so that you can access either server on the same IP, but so that the port number determines which server is accessed, since each service has a different port number?

11
  • 3
    Configure the router. Duh.
    – Marki
    Sep 21, 2013 at 20:11
  • This is obviously possible; even the cheapest home router will do this. What are you really trying to ask? Sep 21, 2013 at 20:12
  • 1
    I would do this with LVS - but this seems to be too complicated. Why can you not assign different IPs to the servers? Or are you searching for a possibilty to forward an IP/Port to another IP/Port with that Cisco-Router?
    – Nils
    Sep 21, 2013 at 20:28
  • @Nils Yep. That, and I want to keep it as simple as possible for everyone else. I know I can just assign two IP addresses, but no one wants to learn 2 IP addresses. They all expect a magic IP address that just works, both inside and outside of the network. Sep 21, 2013 at 20:33
  • That is the reason, why there is DNS. Are you talking about web-services here, or is this a different game?
    – Nils
    Sep 21, 2013 at 20:36

1 Answer 1

0

Set up port forwarding on your router. Use the external IP address of your router as the 'shared' IP. I do this at home to access my IP cameras. I can use the Same IP and port on my client regardless of if I am at home or away. The same idea works here, you just set up the ports you want on your router to nat to the correct destination. Depending on the application, setting up a proxy is probably overkill here.

1
  • It sounds like the poster may be double nat'd. With one router between the internet and the router he is actually connected to (with these servers). If that is the case, the internet router must forward ports to the server router ip address and the server router must forward appropriate ports to on the appropriate server. -question sounds like a common setup on consumer grade hardware with a user that is unfamiliar with subnetting and network address translation. Sep 23, 2013 at 8:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .