Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

resolv.conf option for nameserver with specific port number

18,946 views
Skip to first unread message

Vishwas

unread,
May 15, 2007, 3:16:32 PM5/15/07
to
Hi,

How should the nameserver entry in /etc/resolv.conf file look like if
a DNS is NOT running on the default port number (53).

--
Best Regards,
Vishwas.
ivishwas.googlepages.com

He gives twice who gives quickly. -- Publisus Mimus


Martin McCormick

unread,
May 15, 2007, 4:25:07 PM5/15/07
to
Vishwas writes:
> How should the nameserver entry in /etc/resolv.conf file look like if
> a DNS is NOT running on the default port number (53).

There appears to be nothing you can set in resolv.conf to change
the port number.

Martin McCormick WB5AGZ Stillwater, OK
Systems Engineer
OSU Information Technology Department Network Operations Group


Kevin Darcy

unread,
May 15, 2007, 4:23:04 PM5/15/07
to
Vishwas wrote:
> Hi,

>
> How should the nameserver entry in /etc/resolv.conf file look like if
> a DNS is NOT running on the default port number (53).
>
No system resolver I'm aware of allows the use of a non-standard port
number, so your /etc/resolv.conf file should look "normal", i.e. the
"nameserver" entries should point to IP addresses on which resolvers are
listening on port 53. You have the option, of course, of running
separate instances on the same box, listening on different port numbers.
You could even have the port-53 instance forward to the non-port-53
instance....


-Kevin


Vishwas

unread,
May 15, 2007, 4:30:23 PM5/15/07
to
any trick to achieve this? may be ipchains etc. should help!?

Vishwas.

On 5/16/07, Martin McCormick <mar...@dc.cis.okstate.edu> wrote:


> Vishwas writes:
> > How should the nameserver entry in /etc/resolv.conf file look like if
> > a DNS is NOT running on the default port number (53).
>

> There appears to be nothing you can set in resolv.conf to change
> the port number.
>
> Martin McCormick WB5AGZ Stillwater, OK
> Systems Engineer
> OSU Information Technology Department Network Operations Group
>
>
>

Peter Dambier

unread,
May 18, 2007, 12:18:07 PM5/18/07
to
Vishwas wrote:
> Hi,

>
> How should the nameserver entry in /etc/resolv.conf file look like if
> a DNS is NOT running on the default port number (53).
>

From my resolv.conf

...
options {
...
# listen-on port 53 { any; };
listen-on port 53 { 192.168.208.227; 192.168.48.227; 127.0.0.1; };
listen-on port 3001 { 192.168.208.227; 192.168.48.227; 127.0.0.1; };
# listen-on port 5353 { any; };
# listen-on port 5355 { any; };
...
zone "." in {
type slave;
file "DNSOP/cesidian-root.zone";
# masters { 205.189.71.2; 205.189.71.26; 205.189.71.34; };
# masters { 82.199.205.254 port 3001; };
masters { 212.97.45.53; 82.199.205.254 port 3001; };
};
...

Using this nameserver config and using my local nameserver I can
"tunnel" the firewall.


I am told Sun and Mac can understand

/etc/resolv.conf
----------------

nameserver 192.168.48.227:3001
nameserver 192.168.208.228:53
nameserver 192.168.48.222


But I have not tried. My old SuSE linux does not understand it.


dig can do "-p port (specify port number)"


Kind regards
Peter and Karin


---
Peter and Karin Dambier
Cesidian Root - Radice Cesidiana
Rimbacher Strasse 16
D-69509 Moerlenbach-Bonsweiher
+49(6209)795-816 (Telekom)
+49(6252)750-308 (VoIP: sipgate.de)
mail: pe...@peter-dambier.de
mail: pe...@echnaton.arl.pirates
http://iason.site.voila.fr/
https://sourceforge.net/projects/iason/
http://www.cesidianroot.com/


Kevin Darcy

unread,
May 18, 2007, 3:52:42 PM5/18/07
to
Just tried it on Solaris 9 and it didn't work.

- Kevin


Bryan Irvine

unread,
May 18, 2007, 4:40:00 PM5/18/07
to
> > I am told Sun and Mac can understand
> >
> > /etc/resolv.conf
> > ----------------
> >
> > nameserver 192.168.48.227:3001
> > nameserver 192.168.208.228:53
> > nameserver 192.168.48.222
> >
> >
> Just tried it on Solaris 9 and it didn't work.
>
> - Kevin


Likewise for me on Mac OS X.

-Bryan


Peter Dambier

unread,
May 19, 2007, 3:19:58 AM5/19/07
to
Thankyou for testing.

I wonder how dig does it.

Kind regards
Peter and Karin


--

Vishwas

unread,
May 19, 2007, 3:27:34 AM5/19/07
to
Hi all,

Won't it be a good option if /etc/resolv.conf accepts port numbers
also? Since, the option is not there, am wondering why the designers
have not given it at first place. There must be some reason behind it.

Vishwas.

Peter Dambier

unread,
May 19, 2007, 3:56:04 AM5/19/07
to
Normall you should be able to tune the port in /etc/services

...
domain 53/tcp # Domain Name Server
domain 53/udp # Domain Name Server
...

But I have seen it working for other services, but not for dns.

So I have seen (google) the syntax "ip.port" or "ip:port" for
/etc/resolv.conf for Mac and Sun - maybe it was a daydream but
a good one :)

I have to do some "dns in a nutshell" things like

~> check_soa pirates

b-root.maxmv.org has serial number 2007051503
ns1.nsnoc.com has serial number 2007051503
ns7.pirates has serial number 2007051503
ns8.pirates has serial number 2007051503

but some of our nameservers have to use port 3001 for dns :(


Cheers
Peter and Karin

Chris Thompson

unread,
May 19, 2007, 8:07:21 PM5/19/07
to
On May 19 2007, Peter Dambier wrote:

>Normall you should be able to tune the port in /etc/services
>
>...
>domain 53/tcp # Domain Name Server
>domain 53/udp # Domain Name Server
>...
>
>But I have seen it working for other services, but not for dns.

Is there _any_ resolver library that uses getservbyname() to get
the port number? I doubt it.

--
Chris Thompson
Email: ce...@cam.ac.uk


0 new messages