From owner-freebsd-net@freebsd.org Mon Nov 13 20:45:06 2017 Return-Path: Delivered-To: freebsd-net@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 9525CDD535D for ; Mon, 13 Nov 2017 20:45:06 +0000 (UTC) (envelope-from freebsd@dukhovni.org) Received: from mournblade.imrryr.org (mournblade.imrryr.org [108.5.242.66]) (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 466457D5C5 for ; Mon, 13 Nov 2017 20:45:06 +0000 (UTC) (envelope-from freebsd@dukhovni.org) Received: from [10.71.24.64] (unknown [38.86.167.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mournblade.imrryr.org (Postfix) with ESMTPSA id 2B6EF7A3309 for ; Mon, 13 Nov 2017 20:39:29 +0000 (UTC) (envelope-from freebsd@dukhovni.org) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: chroot implementation of bind and kea From: Viktor Dukhovni In-Reply-To: Date: Mon, 13 Nov 2017 15:38:04 -0500 Content-Transfer-Encoding: quoted-printable Reply-To: freebsd-net@freebsd.org Message-Id: References: To: freebsd-net@freebsd.org X-Mailer: Apple Mail (2.3445.4.7) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 20:45:06 -0000 > On Nov 13, 2017, at 3:14 PM, Dries Michiels = wrote: >=20 >=20 > At the moment BINDS=E2=80=99s default chroot behavior is to move all = necessary files to a directory specified in rc.conf as named_chrootdir. > Afterwards the RC script creates a symlink from /usr/local/etc/namedb/ = to the named_chrootdir so that config files etc can still be modified = from /usr/local/etc/ as that is where they belong. > However, I find the chroot implementation of isc-dhcpd better. That = is, instead of creating a symlink, copying the files over each time the = program is (re)started. > This has the additional benefit that if files in the chroot are = compromised they get overwritten by the originals on service restart. = Could this be implemented for BIND as well? > Another little question regarding chroot, is it possible to make = net/kea chrootable? There are currently no such options in the kea rc = script. One detail to keep in mind is that validating nameservers need to be able to make persistent updates to the root zone trust-anchor keys in accordance RFC 5011. The root KSK will be updated some time next year and ideally periodically there-after. So at least the root zone trust-anchor keys need to persist across restarts and not be reset to their initial state. --=20 Viktor.