Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 2015 11:45:22 +0800
From:      Julian Elischer <julian@freebsd.org>
To:        Nathan Aherne <nathan@vuid.com>, freebsd-net@freebsd.org
Subject:   Re: vimage and jail networking
Message-ID:  <565D17D2.1090007@freebsd.org>
In-Reply-To: <8538858C-BE02-489A-BC1B-2315AC18AD3F@vuid.com>
References:  <8538858C-BE02-489A-BC1B-2315AC18AD3F@vuid.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/12/2015 8:32 AM, Nathan Aherne wrote:
> Hi Everyone!
>
> I am having trouble getting my head around vimage and jail networking. I would like for my jails to have private IPs (10.0.0.0/24) and only use a single public IP.
>
> I am having a hard time finding tutorials or information on how to structure my network. My first thoughts were to clone the loopback interface (have the jails on it) but then I get lost with how to configure the bridging. I found this tutorial on the subject - http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet <http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet>; but I am unsure how the bridging works as the bridge interface does not seem to be bridged to anything.
>
> I would really appreciate it if someone could point me in the correct direction.

It seems to me you are thinking of it in the wrong way.
think of the vimage jails as completely separate machines.
they are connected by virtual point-to-point networks (if you use 
epair) or by a virtual ethernet (if you use netgraph).

how would you do it if you had  one nat router and a bunch of real 
machines on the 10 network behind it?

check out, amongst  other things: 
http://devinteske.com/wp/vimage-jails-on-freebsd-8/
also please first look on your own machine in 
/usr/share/examples/netgraph and especially look at the
virtual.chain and virtual.lan examples
I think they do exactly what you want.


>
> Regards,
>
> Nathan
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>




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