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?
Asked
Active
Viewed 251 times
0
-
What do you mean "connect" to each one of them? SSH, web, ? – h0tw1r3 Jul 28 '11 at 17:35
-
With SSH, like being able to write in xen1.domain.com and get to that certain node. – Kraffs Jul 28 '11 at 17:48
2 Answers
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
- 101,299
- 9
- 108
- 239
-
-
I buy hardware ones so I'm not the best person to suggest a software one, though I'm sure someone will help further. – Chopper3 Jul 28 '11 at 17:49
0
It can't be done seamlessly. You have two options:
- Run one of the SSH daemons on a different port (like 122 vs standard 22)
- 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,776
- 19
- 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
-