How to ask a DNS resolver listening on a different port than the tcp/udp 53

Frank Leonhardt frank2 at fjl.co.uk
Sat Sep 28 13:50:46 UTC 2013


On 28/09/2013 00:20, Michael Sierchio wrote:
> On Fri, Sep 27, 2013 at 4:11 PM, Frank Leonhardt <frank2 at fjl.co.uk> wrote:
>> On 27/09/2013 23:08, Terje Elde wrote:
>>> On 28. sep. 2013, at 00:03, Frank Leonhardt <frank2 at fjl.co.uk> wrote:
>>>
>>>> If I understand the way it works correctly, the resolver pulls a list of
>>>> the NS and hard-sets the port number for each to 53 (via a manifest
>>>> constant) . See libc/resolv/res_init.c. All you need to do(!) is change this
>>>> to a value of your choice and recompile libc
>>> Sorry, but this is startin to look a lot like a complicated solution to a
>>> problem that isn't really there...
>>>
>> It was more of an explanation as to /why/ it's not easy to do what asked in
>> the original reasonable-sounding question.
> Beg to differ.  The question isn't reasonable.  There's no point in
> having a dns recursive resolver listening on a port other than the one
> that clients will contact it on.
>
> Far better to have the authoritative server listen on 127.53.0.1 and
> use the routable address for the cache, which can forward requests for
> the authoritative server when appropriate.
>
>
The original qustion was actually "I wondering how I can send queries to 
a dns resolver listening on a different port than the normaly 53 tcp/udp?"

Given that BIND can happily listen on ports other than 53 and OpenBSD 
allows a port to be specified against each nameserver in resolv.conf, it 
does not seem an unreasonable question to me. Read the rest of the post 
quoted selectively above for the full story.





More information about the freebsd-questions mailing list