Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Feb 2014 09:40:00 -0700
From:      James Gritton <jamie@gritton.org>
To:        freebsd-jail@freebsd.org
Cc:        Beeblebrox <zaphod@berentweb.com>
Subject:   Re: jail.conf setting - prevent alias removal on jail shutdown
Message-ID:  <52F117E0.8030307@gritton.org>
In-Reply-To: <1391519945225-5882902.post@n5.nabble.com>
References:  <1391519945225-5882902.post@n5.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/4/2014 6:19 AM, Beeblebrox wrote:
> I have two NIC's, re1 faces internal LAN. re1 also has a jail running on it
> for diskless clients (tftp, dhcp). IP assigned to re1 by /etc/rc.conf and
> jail.conf are same:  ip4.addr = 192.168.2.1/24
> A /32 subnet will break diskless clients and also prevents gatewaying of
> traffic from laptops connecting from internal LAN.
>
> My problem is if I stop the jail, jail script removes IP assigned by rc.conf
> (obviously). This breaks host gateway function for laptops on the LAN. Is
> there a setting for jail.conf that prevents removal of jail IP on jail
> shutdown? If not, the only alternative remaining is to move jail IP to
> 192.168.2.xx/24 (which I would rather not do).

The IP should only be brought up and down if there's an interface
mentioned in the jail config.  If there's only an IP address, then the
jail will be restricted to that IP address without changing any
interfaces.  I assume your jail configuration has either an
"interface" parameter, or an IP address designation like
"re1|192.168.2.1"?  Just remove that part and you should be good.
Along the same lines, if you're not actually setting the interface,
you don't need to worry about a subnet mask - the jail itself doesn't
use that.

- Jamie



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