[SOLVED] sharing ESXI host IP with pfsense
-
Hi Guys,
Like to check with you that pfsense can share esxi host internet access to other VMs inside that ESXI.
here is details.
I have one esxi host with one public IP. Then I had installed pfsense in it.
I like pfsense to share esxi host public IP to other VMs in it.
is it possible? Sorry if my question is stupid.
If it is not possible, could you tell me how to share esxi host internet access to all the VMs installed inside it?
Thanks in adv.
P.S - I am accessing my ESXI server through public IP via vsphere client.
-
The ESXi host should not (under any circumstances) have a public IP address, you create the VM for pfSense with two (or more) NICs then allocate one of them as the WAN interface for your pfSense VM, other NICs should be the LAN and any others should be allocated as required.
-
The ESXi host should not (under any circumstances) have a public IP address, you create the VM for pfSense with two (or more) NICs then allocate one of them as the WAN interface for your pfSense VM, other NICs should be the LAN and any others should be allocated as required.
Hi Fenice,
thanks for your reply.
Actually, I have a dedicated server with one public IP from soyoustart.com and I installed esxi host. Therefore, my esxi host has only one public IP and I like to share that public IP to the VMs I installed in esxi.
Is it possible?
-
Yes, it's possible.
-
@KOM:
Yes, it's possible.
Hi KOM,
If it is possible, could you share with me how to do it?
P.S - I just bought additional 5 IPs for some of my VMs.
Thanks in adv.
-
Assuming you have at least 2 NICs in your VMware box. Create a vSwitch called Public or Internet or WAN and associate it with your WAN NIC. Associate the VM Network vSwitch with your LAN NIC. For your pfSense VM, plug its WAN NIC into your WAN vSwitch and give the VM one of your public IP addresses.
https://doc.pfsense.org/index.php/PfSense_2_on_VMware_ESXi_5
-
"I like pfsense to share esxi host public IP to other VMs in it."
You only have 1 public IP, they your going to have an issue accessing your vmkern.. You would have to put the vmkern behind pfsense.. You can not set publicIPA on vmkern for esxi host and also put same publicIPA on pfsense wan interface..
-
He got 5 more.
-
Oh must of missed that, yeah if he has multiple public IPs then not an issue just connect the physical nic to the vswitch that has pfsense wan in it and the vmkern port group.
-
Oh must of missed that
Nonsense. I'm the only one who misses things around here.
-
Thank you so much, KOM and Johnpoz.
In conclusion, I need more than 1 Public IP … hehe ...
anyway, my new 5 IPs are alive now, so I am going to setup pfsense tmr (from the link KOM gave) as I do not keep buying public IPs for all the VMs inside my box.
-
yeah once you put the vms behind pfsense you can nat to them. Do you have any ipv6 addresses - its possible you could leverage ipv6 for vmkern and ipv4 for your pfsense wan, etc. If you have like console access to the esxi host you could also put the vmkern behind pfsense nat and only have to use 1 public IP for pfsense wan.
But that is way more difficult to setup, especially if you don't have any sort of out of band access to the esxi host.
-
yeah once you put the vms behind pfsense you can nat to them. Do you have any ipv6 addresses - its possible you could leverage ipv6 for vmkern and ipv4 for your pfsense wan, etc. If you have like console access to the esxi host you could also put the vmkern behind pfsense nat and only have to use 1 public IP for pfsense wan.
But that is way more difficult to setup, especially if you don't have any sort of out of band access to the esxi host.
Hi Johnpoz,
Thank you for your advise, I only have one IPv6 which is tied to main esxi host.
And unfortunately, I do not have console access for free. Have to pay a few dollars for KVM access to server, they will charge me hourly …. :'(
Anyway, next month, I am going to switch to a better plan which include free KVM access, then I will give it a try what you advise me. :)
-
who gives you 1 ipv6 address???
Why would they not just give you a full /64, and let you assign how every many you want/need?
This is on $15 a YEAR!! vps and get full /64 – I would find a new host if you ask me..
-
who gives you 1 ipv6 address???
Why would they not just give you a full /64, and let you assign how every many you want/need?
This is on $15 a YEAR!! vps and get full /64 – I would find a new host if you ask me..
hehe, sorry. I just checked again.
It is /64, not only single IPv6. :D -
Where there you go you have 18,446,744,073,709,551,616 ipv6 addresses to work with, which is a LOT different than 1 ;)