From owner-freebsd-questions@freebsd.org Wed Oct 28 20:28:12 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8BB4A2052B for ; Wed, 28 Oct 2015 20:28:12 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F14F1FEA for ; Wed, 28 Oct 2015 20:28:12 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3FD24201CE for ; Wed, 28 Oct 2015 16:28:05 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute1.internal (MEProxy); Wed, 28 Oct 2015 16:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=qHUV6jkXEryUrV0 e1bscT5PD9fk=; b=f/fSgsEUEQRAj3nUoR83dUif7mMkfccPRJVLTJMVyGyAXEQ XPiKlmB7/LCtTkEH6eu3NT3XV59y4sraHdEjaHsomt7IROJgqHFwmPaha/0UfAeA Kv/7aMmg3OGYu+8mqnUHo53GJlcd8cSVPH1BTb6LhO5Jcv5wWzW3svhayqKM= Received: by web3.nyi.internal (Postfix, from userid 99) id 1AC8410AB36; Wed, 28 Oct 2015 16:28:05 -0400 (EDT) Message-Id: <1446064085.1148620.422968569.0E47599D@webmail.messagingengine.com> X-Sasl-Enc: bydWyqcoYFz4fs9q1+bCupyIa5cdid8wBJFXp+GhLtOo 1446064085 From: Mark Felder To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-48acd4dd Subject: Re: /etc/jail.conf documentation? Date: Wed, 28 Oct 2015 15:28:05 -0500 In-Reply-To: <49230.128.135.52.6.1446047977.squirrel@cosmo.uchicago.edu> References: <49230.128.135.52.6.1446047977.squirrel@cosmo.uchicago.edu> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 20:28:12 -0000 On Wed, Oct 28, 2015, at 10:59, Valeri Galtsev wrote: > Dear All, > > Can someone recommend something similar to FreeBSD handbook that > describes > building jails for newer systems meaning /etc/jail.conf as opposed to > /etc/rc.conf which handbook currently has in its jails chapter. I still > have all jail configurations on 9.3 boxes in /etc/rc.conf, but it is time > to build 10.x production boxes, and do things modern way (implying > /etc/jail.conf). I still intend to keep building jails "old fashion way" > as described in handbook, as opposed to using tools "ezjail" or similar. > > Thanks for all your advises! > > Valeri > > PS I know I can always use UNIX way of getting information, like > > man jail.conf > > , still... > Hi Valeri, It's simpler than you think. Your /etc/jail.conf can be as simple as: exec.start = "/bin/sh /etc/rc"; exec.stop = "/bin/sh /etc/rc.shutdown"; exec.clean; mount.devfs; path = /zroot/jails/$name; myjail{ host.hostname = "myjail.local"; ip4.addr = 192.168.1.5; } You can add more options to the jail as required. Look at jail(8) man page instead of jail.conf(5) which lists the format, but not the options. I think this is kind of backwards myself, but I wasn't involved in these docs. Now you can do "service jail start myjail" it will just work. :-) -- Mark Felder ports-secteam member feld@FreeBSD.org