You are not logged in.

#1 2011-12-11 13:47:17

Vi0L0
Member
From: Poland
Registered: 2009-06-24
Posts: 1,349
Website

resolv.conf's nameserver on other than default port

Recently i've found out that it's not so easy to use port other than default (53) in DNS client specified in /etc/resolv.conf file, like

nameserver IP.OF.DNS.SERVER:20

where 20 is a number of the port.
Is it even possible?
Fast search returns it is not, in whole linux's world :-). Also not in Solaris, not in Mac, not in FreeBSD. But it is possible in OpenBSD.

I have been thinking - what? why? why such an easy thing (at the first sight) to implement isn't done?
It looks like i need some additional stuff like bind to make it right <sigh>

Or maybe i'm wrong here?
I would be very gratefull for any additional info on this topic

Offline

#2 2011-12-11 13:58:05

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: resolv.conf's nameserver on other than default port

I don't understand the need. 53 is the Well Known Port assigned to DNS by the IANA - all DNS servers everywhere operate on that port.

Maybe you can explain in more detail what you're trying to achieve?

Offline

#3 2011-12-11 14:20:57

Vi0L0
Member
From: Poland
Registered: 2009-06-24
Posts: 1,349
Website

Re: resolv.conf's nameserver on other than default port

@tomk:
well yes - every service is assigned to some port, and yes - DNS is a specific kind of service (like also SMTP), but that should not be a reason to cut out my freedom of choice.

ie. i'm in a network which blocks all trafic on 53 port - still i can set up some DNS server which is working on port other than 53, and just use it to bypass firewall rule.
Although setting up client via resolv.conf file is not as easy as it should be. I cannot understand that.

And look - OpenBSD folks have made it... why not Linux?

Offline

#4 2011-12-11 14:45:46

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: resolv.conf's nameserver on other than default port

If I understand you correctly, you are going to set up a nameserver outside of your firewalled network (listening on a non-standard port), and you want to have your arch box be able use it from within the network?

This isn't a direct fix, but as a workaround, you can use pdnsd as a caching proxy, and it can be configured to query the remote server on whatever port you choose by adding

port = your_port_goes_here

in the server section of the pdnsd config file. Once you have it all set up, simply have your resolv.conf point to 127.0.0.1

Hope this helps smile

Last edited by b4data (2011-12-11 14:51:31)

Offline

#5 2011-12-11 17:16:57

Vi0L0
Member
From: Poland
Registered: 2009-06-24
Posts: 1,349
Website

Re: resolv.conf's nameserver on other than default port

@b4data:
well this does look easier than configuring bind, but still involves additional software.
Anyway thanks for showing this good-looking pdnsd smile


Umm... this whole resolver's port thing is nothing new, but is there a place where i can put that kind of "request of functionality"? Upstream - yes, but how to find upstream of grandpa resolver? smile

Last edited by Vi0L0 (2011-12-11 17:17:20)

Offline

#6 2011-12-11 18:19:47

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: resolv.conf's nameserver on other than default port

libresolv is glibc. Good luck.

Offline

Board footer

Powered by FluxBB