Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2025 10:08:33 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        freebsd-virtualization@freebsd.org
Subject:   bhyve slirp network backend improvements
Message-ID:  <aQtocZRPhbLfAK7d@nuc>

next in thread | raw e-mail | index | archive | help

A while back I added a libslirp-based network backend to bhyve.  It
enables usermode networking, very similar to qemu's user networking, but
with the limitation that only inbound connections to the VM are
permitted.  This limitation is imposed by the capsicum sandbox in which
the VM runs.  For my immediate purposes that was fine, but of course
it's fairly limiting in general.

I posted a patch which moves the backend into a separate process so that
the guest can make outbound connections: https://reviews.freebsd.org/D53454

This is enabled by adding the "open" keyword to the slirp backend
configuration.  That is, "-s 4:0,virtio-net,slirp,open" will allow
unrestricted connections from the guest.  One can also add hostfwd rules
as before.  There's still a fair bit of libslirp configuration that
isn't accessible, but this change will hopefully make the slirp backend
more useful to many people.  Comments on the patch or requests for
additional features in this area would be welcome.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aQtocZRPhbLfAK7d>