From owner-freebsd-net@freebsd.org Wed Nov 8 12:17:17 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 F0C07E51741 for ; Wed, 8 Nov 2017 12:17:17 +0000 (UTC) (envelope-from alex@zagrebin.ru) Received: from mail.zagrebin.ru (srv0.zagrebin.ru [IPv6:2001:470:1f15:30e::1]) (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 A877577CDF for ; Wed, 8 Nov 2017 12:17:17 +0000 (UTC) (envelope-from alex@zagrebin.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zagrebin.ru ; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=n6xcuY6wyWDsBG3duY7p9ks2lnXhm9I6YNUFgU1C0O8=; b=CD/3f7wOWmpQn19pwfzUfHvTe0 JtqMqK4A+omut/LhYG0kS/eKyKHUqIIJX4fcWUO3tAEaV9Y5Npbixav7nhZolR3T87vkb/LZWABX+ WpThqD5BuahcFF2ScdJDizypNn0AyziPk0ut5o+aycKaj7SxaNdIPotwNZRudcmcuuB4LvVOvFMDQ 5p1uUXkBlExp7Yul8tEwqfsQEkiWiu3tFyPfnZH/QYAPArk3aE234OZY9mf1y9iBzFac2MyRA8m5a 4FzKoR4g2B2RU9YiVrcuKy2X/rfqhIJGK/V5V0wjYGyQj+Cr+NI7r0rdwDM9IQ6DQXg+AkeENxBxq Xm68om2w==; Received: from [2001:470:1f15:30e::2] (helo=vm2.home.zagrebin.ru) by mail.zagrebin.ru with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89 (FreeBSD)) (envelope-from ) id 1eCPIB-000Lka-1M for freebsd-net@freebsd.org; Wed, 08 Nov 2017 15:17:15 +0300 Date: Wed, 8 Nov 2017 15:17:13 +0300 From: Alexander Zagrebin To: freebsd-net@freebsd.org Subject: Re: local_unbound, resolvconf, vpn Message-ID: <20171108151713.413d28c4@vm2.home.zagrebin.ru> In-Reply-To: <5689438f-6734-6b57-b700-d70ee2b7578a@FreeBSD.org> References: <5689438f-6734-6b57-b700-d70ee2b7578a@FreeBSD.org> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.31; amd64-portbld-freebsd11.1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2017 12:17:18 -0000 В Wed, 8 Nov 2017 13:38:28 +0200 Andriy Gapon пишет: > I've just enabled local_unbound on a machine and everything seems to > work fine. But there are a few minor quirks that I would like to > report. > Last. Every time I connect to a VPN (via vpnc or openvpn, for > exmaple) the unbound daemon is restarted. That's expected because > its configuration is changed. But there is a slightly annoying > message that appears to be harmless: unbound: [7457:0] error: cannot > chdir to directory: (No such file or directory) > > I wonder what causes this messages and if it's possible to shut it up. This message appears because you are using chroot. You have to edit /var/unbound/unbound.conf and add a trailing slash to value of the 'directory' parameter: server: ... chroot: /var/unbound directory: /var/unbound/ ... When unbound uses chroot, it determines the directory name, that it will be use for chdir call, taking in account the value of 'chroot' parameter. If 'chroot' equals 'directory' the unbound will call chdir(''), which will cause an error. -- Alexander Zagrebin