Date: Mon, 21 Aug 2017 20:03:54 +0700 From: Victor Sudakov <vas@mpeks.tomsk.su> To: Bert Kiers <kiersb@xs4all.net> Cc: freebsd-net@freebsd.org Subject: Re: resolv.conf and a non-standard port Message-ID: <20170821130354.GA46955@admin.sibptus.transneft.ru> In-Reply-To: <569ac975-0f5c-131a-a236-67cff377ef6c@xs4all.net> References: <20170821102354.GA44676@admin.sibptus.transneft.ru> <5e2bb578-a9c7-93fa-f144-d0a4302cb28c@xs4all.net> <20170821110400.GA45463@admin.sibptus.transneft.ru> <569ac975-0f5c-131a-a236-67cff377ef6c@xs4all.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Bert Kiers wrote: > >> > >>> How can I configure the resolver to use a DNS server with a > >>> non-standard port? > >>> > >>> I have a host running an authoritative-only server (nsd) for the > >>> world, and I want to run local unbound for the host itself (can't use > >>> nsd for recursive queries). > >>> > >>> Unbound can listen on a non-standard port, but how do I configure the > >>> host to use the DNS server at 127.0.0.1:5353 ? > >> > >> I think it will be more simple to have nsd and unbound listen on > >> different IP-adresses, like unbound on 127.0.0.1 and nsd on the external > >> IP-address. Then put 127.0.0.1 in resolv.conf > > > > That's how I have configured it now, but this solution has a major > > drawback: you need to specify the IP address explicitely in > > /var/unbound/unbound.conf which can be inconvenient in some > > situations. > > > > So it's a workaround, but by no means "more simple." > > What happens when you let unbound listen on 127.0.0.1 and nsd on * > (a.k.a. 0.0.0.0)? That may work because 127.0.0.1 is more specific. > Maybe the startup order of the daemons is important then. # sockstat -l | grep unbo unbound unbound 448 3 udp4 127.0.0.1:53 *:* unbound unbound 448 4 tcp4 127.0.0.1:53 *:* unbound unbound 448 5 stream /var/run/local_unbound.ctl # service nsd start [2017-08-21 20:01:16.335] nsd[56380]: notice: nsd starting (NSD 4.1.17) [2017-08-21 20:01:16.336] nsd[56380]: error: can't bind udp socket: Address already in use [2017-08-21 20:01:16.336] nsd[56380]: error: server initialization failed, nsd could not be started -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN AS43859
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170821130354.GA46955>