vnet Jail on a non-dedicated network interface

Kristof Provost kp at FreeBSD.org
Wed Oct 14 12:42:27 UTC 2020


On 14 Oct 2020, at 14:18, Arsenij Solovjev wrote:
> Hi all!
> Does anybody know if it's possible to run a vnet jail on a 
> non-dedicated
> interface? I have the Lucas book on jails. In it he says that for vnet 
> you
> need to pick a dedicated interface, remove all networking IP 
> configuration
> and only bring it up. Afterwards you set up jib and whatnot.
>
> All works well if I use a dedicated secondary interface (let's call it
> em1). If I use em0 however I cannot ping the jail.
>
> I would like to have a host with that has a single network interface 
> which
> is used for both normal networking stuff as well as having the vnet 
> jail
> run on it.
>
> Maybe I could create some sort of virtual interface and run vnet on 
> it?
>
> Any ideas here? Thanks in advance!
>
Look at epair interfaces.

You can put em0 and epair0a in a bridge together and add epair0b to the 
vnet jail.
That gets the vnet jail connected to your LAN.

Or you can skip the bridge, assign an IP to epair0a and route between 
the jail and your LAN.

Regards,
Kristof


More information about the freebsd-jail mailing list