From owner-freebsd-net@freebsd.org Mon Nov 13 13:55:34 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 6C4C9DBB216 for ; Mon, 13 Nov 2017 13:55:34 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 36F316F39C; Mon, 13 Nov 2017 13:55:33 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id BE19710CFE; Mon, 13 Nov 2017 13:55:26 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 0F0A061D9; Mon, 13 Nov 2017 13:55:25 +0000 (UTC) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Andriy Gapon Cc: freebsd-net@FreeBSD.org Subject: Re: local_unbound, resolvconf, vpn References: <5689438f-6734-6b57-b700-d70ee2b7578a@FreeBSD.org> Date: Mon, 13 Nov 2017 14:55:24 +0100 In-Reply-To: <5689438f-6734-6b57-b700-d70ee2b7578a@FreeBSD.org> (Andriy Gapon's message of "Wed, 8 Nov 2017 13:38:28 +0200") Message-ID: <86a7zq8er7.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 13:55:34 -0000 Andriy Gapon writes: > First, there is now an automatically generated /etc/resolvconf.conf. > It has the following comment: > # This file was generated by local-unbound-setup. > # Modifications will be overwritten. > Is that comment really true? > What and when is going to overwrite my modifications? service local_unbound setup > Next. The auto-generated resolvconf.conf has this trick to prevent modifi= cations > of resolv.conf: resolv_conf=3D"/dev/null" > The trick works but it causes some small noise when resolvconf is run, li= ke > cannot copy /dev/null to /dev/null.bak. > I think that a nicer solution is to just set name_servers=3D127.0.0.1: No, if we let resolvconf overwrite resolv.conf then we lose "options edns0". What it boils down to is that resolvconf is a piece of shit and the only way to get it to do what we want would be to write a special backend for the local_unbound case (see /libexec/resolvconf). > unbound: [7457:0] error: cannot chdir to directory: (No such file or dir= ectory) This error is emitted by the configuration parser when it encounters the "directory" directive in the "server" section and fails to chdir to the specified directory, but there should be a name there. Can you do: # service local_unbound stop # mv /var/unbound /var/unbound.orig # mtree -deU -f /etc/mtree/BSD.var.dist # service local_unbound setup # diff -ru /var/unbound.orig /var/unbound and tell me if there are any differences? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no