Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Aug 2013 12:23:44 +0100
From:      Arthur Chance <freebsd@qeng-ho.org>
To:        Karl Pielorz <kpielorz_lst@tdx.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Static Jail ID's (JID's) for use with IPFW?
Message-ID:  <52022E40.8050007@qeng-ho.org>
In-Reply-To: <6AEEAD32A5BF3013464C98A1@Mail-PC.tdx.co.uk>
References:  <6AEEAD32A5BF3013464C98A1@Mail-PC.tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/08/2013 09:28, Karl Pielorz wrote:
> I have a number of jailed systems running - and I've been setting up
> ipfw rules for them.
>
> This is on FBSD 9.1.
>
> 'ipfw' lets you match on traffic to/from a Jail ID (JID) - however every
> time jails get started / stopped their JID changes [thus breaking the
> firewall rules].
>
> I can't see anywhere to 'statically' configure a JID to a Jail (i.e. in
> /etc/rc.conf).


I don't think the old /etc/rc.conf way of handling jails lets you do it, 
but the latest version of jail(8) introduced /etc/jail.conf and you 
should be able to add "jid = <N>;" parameters in there.

I've no idea what will happen if your choice conflicts with an 
automatically generated jid, so you'll either have to make sure all 
jails have fixed jids, or choose a suitably high range for fixed ones 
and hope you never generate too many unfixed jids.

-- 
In the dungeons of Mordor, Sauron bred Orcs with LOLcats to create a
new race of servants. Called Uruk-Oh-Hai in the Black Speech, they
were cruel and delighted in torturing spelling and grammar.

		_Lord of the Rings 2.0, the Web Edition_



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52022E40.8050007>