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

jb jb.1234abcd at
Fri Sep 27 21:32:04 UTC 2013

Laurent SALIN <salin.laurent <at>> writes:

> Hello,
> I wondering how i can send queries to a dns resolver listening on a
> different port than the normaly 53 tcp/udp ?
> The situation:
> I've got a vps who running NSD as a autoritative nameserver, listening
> on tcp/udp 53 and unbound as personnal resolver, listening on a
> different tcp/udp port. It work very well on his own or with my OpenBSD
> gateway at home as DNS cache.
> Recently i've got a new FreeBSD VPS and I want to use the first VPS as
> DNS nameserver for the second VPS but FreeBSD is unable to send queries
> to nameserver on a different port as the normal one (tcp/udp 53).
> I've got a "bad" solution, use unbound on the second VPS and maybe tell
> him to ask the 1rst VPS on the unusual tcp/udp port, but I wonder myself
> if is it possible with Packet Filter to change the destination port of
> the queries forwarded to my 1rst VPS from tcp/udp 53 to tcp/udp 5353 for
> exemple ?
> Or maybe anybody got a other solution ?
> I hope you'll understand me :-/
> Laurent SALIN

Well, I hope I understand you.
You use DNS Proxy server, like BIND or DNSMASQ.

With BIND you have options in /etc/named.conf:

I do not know how DNSMASQ configures it, if at all - you would have to
download original package with full documentation.



More information about the freebsd-questions mailing list