-1

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?

Dagvadorj
  • 101
  • 3

2 Answers2

2

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.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
2

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.

Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • 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