Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server with adequate amount of memory and also I have a single static IP. I want to install XenServer or ESXi on my server and create bunch of virtual machines. In order to use all these virtual machines from outside world, I want to direct all the network activity of XenServer (or ESXi) to one of the virtual machines so that with use of iptables, I can configure network traffic to all other virtual machines.

Is it possible and is it the best practice for this scenario?

share|improve this question
add comment

2 Answers

Is it possible? Absolutely.

Is it best practice? No, not really. I can tell you from personal experience that it's not a lot of fun to lose routed management access to the host when its VMs are down.

share|improve this answer
    
Do you mean that I should to all the routing in iptables in the XenServer? –  Dagvadorj Nov 22 '11 at 16:29
add comment

Yep, you can do this easily, there are lots of pre-built VMs to do just this in fact, the one I'd recommend is 'pfsense'.

What you end up doing is creating one vSwitch with two port-groups, the router gets vNICs in both P-G, one going to the outside world and one going to the internal port-group (if you have two physical NICs it might be safer to have two vSwitches, one P-G per vSwitch, it'd be safer). Then the clients talk just to the internal P-G and the router NATs or whatever between both networks.

share|improve this answer
    
After that how do I connect to a virtual machine? Say ESXi has static IP a.b.c.d and vm has IP 192.168.2.6. –  Dagvadorj Nov 27 '11 at 13:43
    
????????????????????? –  Dagvadorj Nov 27 '11 at 13:54
3  
Don't ever be that impatient on this site again - you seriously expect a reply to a comment within 12 minutes ON A SUNDAY. It's also a terrible, unanswerable follow-up question anyway, learn to use this site or your account will be suspended, if nothing else just for being rude. –  Chopper3 Nov 27 '11 at 14:28
2  
After that how do I connect to a virtual machine? Well, I sincerely hope you'll read the documentation and setup guides properly for you to find that out. –  tombull89 Nov 27 '11 at 19:50
add comment

Your Answer

 
discard

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.