Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [SOLVED] sharing ESXI host IP with pfsense

    Scheduled Pinned Locked Moved Virtualization
    16 Posts 4 Posters 5.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zawyetun
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • F
        fenice
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • Z
          zawyetun
          last edited by

          @fenice:

          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?

          1 Reply Last reply Reply Quote 0
          • KOMK
            KOM
            last edited by

            Yes, it's possible.

            1 Reply Last reply Reply Quote 0
            • Z
              zawyetun
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • KOMK
                KOM
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  "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..

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • KOMK
                    KOM
                    last edited by

                    He got 5 more.

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      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.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • KOMK
                        KOM
                        last edited by

                        Oh must of missed that

                        Nonsense.  I'm the only one who misses things around here.

                        1 Reply Last reply Reply Quote 0
                        • Z
                          zawyetun
                          last edited by

                          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.

                          1 Reply Last reply Reply Quote 0
                          • johnpozJ
                            johnpoz LAYER 8 Global Moderator
                            last edited by

                            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.

                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                            If you get confused: Listen to the Music Play
                            Please don't Chat/PM me for help, unless mod related
                            SG-4860 24.11 | Lab VMs 2.8, 24.11

                            1 Reply Last reply Reply Quote 0
                            • Z
                              zawyetun
                              last edited by

                              @johnpoz:

                              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. :)

                              1 Reply Last reply Reply Quote 0
                              • johnpozJ
                                johnpoz LAYER 8 Global Moderator
                                last edited by

                                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..

                                ipv6addresses.png
                                ipv6addresses.png_thumb

                                An intelligent man is sometimes forced to be drunk to spend time with his fools
                                If you get confused: Listen to the Music Play
                                Please don't Chat/PM me for help, unless mod related
                                SG-4860 24.11 | Lab VMs 2.8, 24.11

                                1 Reply Last reply Reply Quote 0
                                • Z
                                  zawyetun
                                  last edited by

                                  @johnpoz:

                                  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

                                  1 Reply Last reply Reply Quote 0
                                  • johnpozJ
                                    johnpoz LAYER 8 Global Moderator
                                    last edited by

                                    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 ;)

                                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                                    If you get confused: Listen to the Music Play
                                    Please don't Chat/PM me for help, unless mod related
                                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.