Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server with debian that uses the xen kernel. I've successfully created and started 2 xen nodes, lets call them and 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?

share|improve this question
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 and get to that certain node. – Kraffs Jul 28 '11 at 17:48

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).

share|improve this answer
Can you suggest a good software one? – Kraffs Jul 28 '11 at 17:47
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

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.

share|improve this answer
I can currently connect to them by using their internal ip, but I want to be able to connect with using a subdomain like 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.