0

I have a server with debian that uses the xen kernel. I've successfully created and started 2 xen nodes, lets call them xen1.domain.com and xen2.domain.com. They both have their own internal ip and they can be connected to interally. But the problem is that I only have 1 external ip. Is it possible for them to share the same external ip yet be able to connect to each one of them? I have a domain but I'm not sure how to set up the DNS records to work with this. Does anyone know how to do this?

Kraffs
  • 132
  • 7

2 Answers2

0

Yes, you need a load-balancer.

It 'own's the external IP and then uses one of a variety of methods to decide which of the internal servers to send the request to.

These are used everywhere all the time to deal with service outages etc. There are hardware ones such as those made by Cisco and F5 and software ones too (some are free, do some googling around).

Chopper3
  • 100,240
  • 9
  • 106
  • 238
0

It can't be done seamlessly. You have two options:

  1. Run one of the SSH daemons on a different port (like 122 vs standard 22)
  2. Port forward on the router. Outside port 122 -> port 22 of secondary host.

Then you can connect via ssh if you specify the port number.

h0tw1r3
  • 2,746
  • 18
  • 17
  • I can currently connect to them by using their internal ip, but I want to be able to connect with using a subdomain like xen1.domain.com. Problem is that both have the same external ip so they collide. – Kraffs Jul 28 '11 at 19:07
  • That's the whole point of changing ports, so they don't collide. – h0tw1r3 Jul 28 '11 at 20:06