wlanboy
Content Contributer
I would not use any real network device for vms.Well from your previous post it looks like re1 would be physical interface....or would it? I mean it could really be either. So my thought process says to add it like you would to a virtual hosted apache instance. Where you apply the IP address to the virtual host and continue to use the mgmt IP to get into the main server. Am I right in this being the way I want to go? Is there something I need to do to the routing on the local server? I am still new to FreeBSD. I like it. it forces me to learn.
Thanks in advance!
Look at my tutorial at the section of this code:
gateway_enable="YES"
cloned_interfaces="lo10"
ifconfig_lo10_alias0="inet 10.10.10.1 netmask 255.255.255.0"
ifconfig_lo10_alias1="inet 10.10.10.10 netmask 255.255.255.0"
That will create a virtual network. alias0 is for the host, additional aliases for the vms.
After that you can use pf to forward ports.
The section with following code will guide you:
# nat jail traffic
nat pass on $external_if from $NET_JAIL to any -> $IP_PUBLIC
# web forward
rdr pass on $external_if proto tcp from any to $IP_PUBLIC port $PORT_WWW -> $IP_JAIL_WWW
So all vms can access the internet but the port 80 of the host is forwarded to the vm.
Basically the same setup as the IPV6 providers. One public ip for all vms.