FreeBSD a server and bhyve

Patrick M. Hausen hausen at punkt.de
Wed Aug 12 11:33:11 UTC 2020


Hi all,

> Am 11.08.2020 um 22:15 schrieb Pete Wright <pete at nomadlogic.org>:
> this should be pretty straight forward - the first step would be to setup the additional public IP's as virtual addresses on your NIC similar to this:
> https://www.freebsd.org/doc/handbook/configtuning-virtual-hosts.html
> 
> then setting up your firewall (pf or ipfw) to forward requests coming in on one of those public IP's to the specific bhyve VM which is listening on a private IP.  this would be identical to hosting multiple services on a single IP.
> 
> here's an example pf config that does the forwarding of SMTP on port 25 to a VM using a private IP to give you an idea of what the syntax would look like:
> rdr pass on $ext_if inet proto tcp from any to 1.2.3.4 port = 25 -> 10.1.0.10 port 25

Why so complicated? Why not just bridge the bhyve VM to the physical NIC
and assign that additional IP address in the guest OS?

At least that is what I do all the time ;-)

Kind regards,
Patrick
--
punkt.de GmbH
Patrick M. Hausen
.infrastructure

Kaiserallee 13a
76133 Karlsruhe

Tel. +49 721 9109500

https://infrastructure.punkt.de
info at punkt.de

AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20200812/187b59ae/attachment.sig>


More information about the freebsd-virtualization mailing list