Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2016 23:47:55 -0500
From:      "Isaac (.ike) Levy" <ike@blackskyresearch.net>
To:        galtsev@kicp.uchicago.edu
Cc:        freebsd-jail@freebsd.org
Subject:   Re: multiple interfaces for jail.conf(1) and jail_set(2)
Message-ID:  <BF1B3D9C-D3D3-4F57-9B10-417C176E8423@blackskyresearch.net>
In-Reply-To: <11488.128.135.52.6.1481666606.squirrel@cosmo.uchicago.edu>
References:  <0ED7F403-F14E-4A72-8E54-AF74AAE15061@blackskyresearch.net> <11488.128.135.52.6.1481666606.squirrel@cosmo.uchicago.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Valeri,

> On Dec 13, 2016, at 5:03 PM, Valeri Galtsev =
<galtsev@kicp.uchicago.edu> wrote:
>=20
> On Tue, December 13, 2016 2:14 pm, Isaac (.ike) Levy wrote:
>> Hi All,
>>=20
>> Can I specify multiple IP interfaces and assign IP=C3=A2=C2=80=C2=99s =
to them using
>> jail.conf?
>> I have jails with IPv4/IPv6 addresses on multiple physical =
interfaces, as
>> well as assigning a loopback.
>=20
> Last time I tried it which was about year and a half ago the answer =
was:

Just to clarify your answer,

> no, this is not possible. Jail can only have one IP address (in =
addition
> to loopback addresses).

Do you mean this just for jail.conf configuration/usage?

If so, from all I=E2=80=99ve read and tried, that makes complete sense, =
and makes me sad as it prevents me from using the slickness of =
jail.conf(1) and jail_set(2) - not yet :)

--
However, to be very clear for the list archive, jails can most =
definately have many IP addresses, (since between FreeBSD 7 and 8 I =
believe?), including loopback, (which is just an IP address like any =
other),

For example,

# ifconfig em0 inet alias 10.10.10.10/32
# ifconfig em1 inet alias 10.10.10.11/32
# ifconfig lo0 inet alias 127.0.0.11/32
# ifconfig em0 inet6 alias 2:2:2:2::10 prefixlen 64
# jail -c path=3D/some/place host.hostname=3Dmyjail =
ip4.addr=3D=E2=80=9C10.10.10.10,10.10.10.11,127.0.0.11" =
ip6.addr=3D"2:2:2:2::10" command=3D/bin/sh /etc/rc

Best,
.ike





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF1B3D9C-D3D3-4F57-9B10-417C176E8423>