Re: State of virtualization on FreeBSD

From: Paul Pathiakis <pathiaki2_at_yahoo.com>
Date: Wed, 17 May 2023 15:58:42 UTC
 If you set up pf correctly, you can redirect any traffic to any virtual IP.  However, you may need to redirect the ports to get to the correct machine.
I used to have about 10 jails setup for things like DNS, Apache, mail, etc.  Incoming and outgoing went across the usual ports... however, after entering the GW, it would redirect to the correct machine onto, sometimes, a different port.
Paul
    On Wednesday, May 17, 2023 at 07:40:17 AM PDT, Dale Scott <dalescott@shaw.ca> wrote:  
 
 
I also just encountered iocage today. Going to compare.
Is it possible to make VMs/Jails externally/publicly accessible when you have only 1 public IP address?

I don't know about jails, but vm's may require configuring a virtual network, a DHCP server and a firewall with NAT rules if you only have one public IP address. This will be required with a bhyve vm, but it built-in with virtualbox-ose.
If you used an external NAT router, you could configure the guest vm to bridge the host Ethernet interface (the default for bhyve), which would allow both the host and guest vm to access the internet, but only one would be reachable from the internet (by configuring the "pass-thru" feature on the NAT router).