Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jan 2011 16:45:51 +0100
From:      Stefan Bethke <stb@lassitu.de>
To:        =?iso-8859-1?Q?Peter_Ankerst=E5l?= <peter@pean.org>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: Multiple interfaces
Message-ID:  <E0642C16-03E9-4CBC-BADA-4ABC78B6C218@lassitu.de>
In-Reply-To: <4D2B179C.8000408@pean.org>
References:  <4D2B179C.8000408@pean.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 10.01.2011 um 15:28 schrieb Peter Ankerst=E5l:

> I want access to a public and a private network from a jail.
>=20
> Can I configure a jail with multiple interfaces?

Yes, see rc.conf(5):
     jail_<jname>_ip
                 (str) Unset by default.  Set to the (primary) IPv4 =
and/or
                 IPv6 address(es) assigned to the jail.  The argument =
can be a
                 sole address or a comma separated list of addresses.  =
Addi-
                 tionally each address can be prefixed by the name of an
                 interface followed by a pipe to overwrite
                 jail_<jname>_interface or jail_interface and/or =
suffixed by a
                 netmask, prefixlen or prefix.  In case no netmask, =
prefixlen
                 or prefix is given, `/32' will be used for IPv4 and =
`/128'
                 will be used for an IPv6 address.  If no address is =
given for
                 the jail then the jail will be started with no =
networking
                 support.

Assuming that the private and the public networks are attached to em0 =
and em1, respectively, you'd set
 jail_myjail_ip=3D"em0|172.17.43.3,em1|192.0.2.27"
in rc.conf.


Stefan

--=20
Stefan Bethke <stb@lassitu.de>   Fon +49 151 14070811




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0642C16-03E9-4CBC-BADA-4ABC78B6C218>