From owner-freebsd-questions@freebsd.org Tue Dec 1 17:20:25 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F110B4AF382 for ; Tue, 1 Dec 2020 17:20:25 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailout.qeng-ho.org (mailout.qeng-ho.org [217.155.128.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ClplF0HwTz4Zl0 for ; Tue, 1 Dec 2020 17:20:24 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (unknown [IPv6:2a02:8010:64c9:1::2]) by mailout.qeng-ho.org (Postfix) with ESMTP id 0EFFA32621; Tue, 1 Dec 2020 17:20:23 +0000 (GMT) Subject: Re: Unbound To: RW , freebsd-questions@freebsd.org References: <20201130222149.d7b8783764a036548c29fdd5@web.de> <20201130223849.237eb9fe@gumby.homeunix.com> <20201201163525.11cd1f79@gumby.homeunix.com> From: Arthur Chance Message-ID: <2e457853-d303-11fb-5a6c-9f84ac7cec96@qeng-ho.org> Date: Tue, 1 Dec 2020 17:20:20 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201201163525.11cd1f79@gumby.homeunix.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4ClplF0HwTz4Zl0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@qeng-ho.org designates 217.155.128.244 as permitted sender) smtp.mailfrom=freebsd@qeng-ho.org X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[217.155.128.244:from]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:217.155.128.240/29]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[qeng-ho.org]; ARC_NA(0.00)[]; SPAMHAUS_ZRD(0.00)[217.155.128.244:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEMAIL_TO(0.00)[googlemail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13037, ipnet:217.155.0.0/16, country:GB]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2020 17:20:26 -0000 On 01/12/2020 16:35, RW via freebsd-questions wrote: > On Tue, 1 Dec 2020 12:42:07 +0000 > Arthur Chance wrote: > > >>> I'd be interested to know whether it does work because someone once >>> mentioned that local_unbound only supports forwarding, but I've >>> never found anything to back that up. >> >> From memory, if you've not set anything up the first time >> local_unbound runs it reads your /etc/resolv.conf to gather your >> resolvers and creates an unbound.conf that uses them for forwarding >> for all domains. > > It set itself-up with google and opendns caches when I tried it. That would have been taken from your resolv.conf >> If you've set things up yourself it just runs with >> that, but take a look at /etc/rc.d/local_unbound to find out which >> file(s) it needs to see in order to avoid the default configuration >> process. > > It's all gets tied-in to dnsconf and the various configuration files > come with warnings that they are autogenerated and could be > overwritten. I have no need for dnsconf, so I just installed the > package version which works recursively by default. > > The question was more about whether the binary supports recursion. > As I said, someone on the list (from the project) said that it doesn't. > He may just have meant that they made it awkward to turn-off > forwarding, but there's clearly something built-out of the local > version: It's always better to take a look at the source yourself. If you look at the shell script /usr/sbin/local-unbound-setup which is what does the autoconfig if you don't have a predefined unbound.conf, you'll see it can create either a pure forwarding config or a recursive one if you give it "none" as the forwarders list. The major differences between local-unbound and the unbound package are a) the package is updated between releases and b) the package uses a full kqueue based libevent rather than a select based internal libevent that isn't as efficient under heavy load. Both are equally capable of recursive resolution. -- The number of people predicting the demise of Moore's Law doubles every 18 months.