1 Public IP 1 NIC ESXi to multipule VMs (with external access)

pfsensevmware-esxi

So I have purchased a Server from https://www.kimsufi.com/fr/index.xml, KS-5A to be exact.

Kimsufi only give you 1 Public IP address and 1 NIC to work with, and you cannot purchase more.

I have installed ESXi to the Server and I am attempting to setup about 5-6 Virtual machine that I wish to connect to the internet.

As far as I understand ESXi doesn't do routing, so I installed Pfsense to a VM to do the routing for me and giving me a LAN to work with.

My pfsense currently cannot communicate with the Management Network(Public IP), during setup I did. em0(WAN) then em1(LAN) and I didn't get any IP address assigned to the WAN interface but I did however get 192.168.1.1 to the LAN allowing me to access the router via web GUI on the Windows 7 Machine.

How can I setup the network so I can pass a connection through the ESXi Host to the Pfsense router to then manage the internal LAN for the Virtual machines to connect outside.

I am not bothered by firewalls and security. All that matters is the virtual machines being able to connect to the internet without interfering with each other.

Other methods where Pfsense is not needed and still allow the virtual machines to connect to the internet without having more than 1 Public IP address I am open to.

I have been trying to work this out for weeks, Thanks in advanced.

Best Answer

What you need to do is create 2 virtual switches. First one will be connected to a network interface with public IP and other one will be for internal use.

Connect pfSync to both, while all other VMs should be connected only to internal switch. Then set up NAT in pfSync.

But, problem is you only have 1 public IP at your disposal, and that IP should be transferred from VmWare to pfSync, while new MGMT ip should be set in the private network. Then you should set up port forwarding on pfSync so that you are still able to access VmWare.

But, if you try to do it without backdoor (eg. server ILO, DRAC or some similar remote access console software - or direct physical access - which you don't have for hosted server), you can easily end up without any access to either VmWare or pfSync. So, I wouldn't do it without backdoor.

On the other hand, I suggest you to use some other OS - which supports NAT and routing out of the box - as a native installation instead of VmWare ESXi.

In short: you are missing either physical/virt console access, or another IP to set this up properly and safely.