I have a cheap but powerful dedicated server I am leasing with OVH, because they were recently having a promotion. I would like to try and manage all this power by playing with VMs using ESXi.
However I am only provided with a single NIC.
I had thought this would be easy to get around since, at home I have a single NIC which is my broadband modem, and yet a simple NAT gateway device happily provides internet access to all my devices.
I am struggling to implement this on ESXi, though. Can anyone advise on how I could go about having ESXi and multiple VMs working with just one NIC?
Here's my current setup:
I believe all I need is to be able to configure NAT from the NIC to all the VMs etc.. How would I set up and administer this kind of infrastructure?
One NIC is very doable, I've done this several times. When you're going through the setup, you give it an IP address for your Management network. Then afterwords when you connect the client to it, you can configure the VMNET to use the same NIC. It'll complain that they really should be separated, but it'll work.
However, you tagged this nat so I'm guessing the actual question here is:
This is a very different problem, since one NIC can have thousands of IP addresses behind it.
This may not be doable with your specific situation, but what you're talking about can be done. You do this by creating another virtual switch with no physical NICS in it.
ESXi 5 host-only test environment
You'd then create a VM that bridges the two vswitches that acts as a NAT-gateway between the two. Your management network would go on the private vswitch, and a port pass-through configured on the NAT gateway to allow you to connect to it.
However, I can see no possible way to set that up without physical access to the machine, so this solution is of limited use.
I think you're confusing your single public ip address with the internal ip addresses configured on your virtual machines. You should be assigning ip addresses to your vSphere host and to your virtual machines from an address space as defined in RFC 1918. As for forwarding traffic from your public ip address to your virtual machines for inbound access to services such as HTTP, SMTP, FTP, etc. you can forward a single port to any one of your virtual machines (port 80 for instance). If you need to forward a single port to multiple virtual machines (port 80 forwarded to two different virtual machines) then you'll need to look into some type of proxy.
As for using a single NIC in the vSphere host, it's certainly do-able. When you create your vSwitch you'll simply create it with a VMkernel port (for accessing and managing the host) and a Virtual Machine Port Group (for the virtual machines). This will give the virtual machines physical acess to the same physical network that the vSphere host is connected to. The vSphere install (IIRC) should create a vSwitch for you that will be configured for both management (VMkernel) and virtual machine (Virtual Machine Port Group) access.
I might be wrong but If You create/configure a Router VM Appliance On Your ESXi Host ( the one with that One Public IP Address You can then handle PORT Forwarding Back and Forth like this ::
These are 1:1 translations therefore in the example 8080 has already taken so for InternallIPServer2 it can not be used ( have to go with something else)
As Virtual Router Appliances goes there are tons of them Open Source, etc.. Vyatta, Halon, Cisco, PFSense can also be as a router, DD WRT ...and so on
I hope I made no mistake trying to get what you mean to achive, and probably I gave some ideas if not anything else...
ESXi Pros can correct me and correct me if I made a mistake :)