How do I determine the IP address of my ISP's nameservers? (/etc/resolv.conf only shows the default gateway)

2

1

My home server is connected to the router. This is the output of the /etc/resolv.conf file

nameserver 192.168.1.1

How do I determine the IP address of my ISP's nameservers?

user784637

Posted 2012-01-09T07:44:29.897

Reputation: 1 365

3Why not just the support web site for your ISP? Most have a FAQ that includes lots of details like this. – Zoredache – 2012-01-09T08:04:50.803

1Do you mean their authoritative nameservers? Or do you mean their recursive nameservers? (The correct answer to your question depends heavily on what you plan to do with that information.) – David Schwartz – 2012-01-09T08:51:53.410

Answers

1

Go to Network Tools

Select the "DNS Records" option. By default, your external IP is currently in the search box. Click the "Go!" button. This will show you all the DNS records including the official IP address of your ISP's name servers.

Here's an example:

Retrieving DNS records for ip-xxx.xx.xx.xx.xdsl.xnet.co.nz...
DNS servers
ns3.wxnz.net [113.20.11.209]
ns2.wxnz.net [58.28.6.2]
ns1.wxnz.net [58.28.4.2]

Answer records
ip-xxx.xx.xx.xx.xdsl.xnet.co.nz     A   xxx.xx.xx.xx    3600s

Authority records
xnet.co.nz      NS  ns1.wxnz.net    3600s
xnet.co.nz      NS  ns2.wxnz.net    3600s
xnet.co.nz      NS  ns3.wxnz.net    3600s

Additional records
ns1.wxnz.net        A   58.28.4.2   300s
ns2.wxnz.net        A   58.28.6.2   300s
ns3.wxnz.net        A   113.20.11.209   300s
ns1.wxnz.net        28  [16 bytes]  300s
ns2.wxnz.net        28  [16 bytes]  300s
ns3.wxnz.net        28  [16 bytes]  300s

However, you may also find it better to browse the help pages for your ISP. They usually publish what numbers should be used for DNS. What you find using Network Tools is actually the IP addresses of the DNS servers that server the hostnames for your ISP's domain. They may have other caching DNS servers with different IP's that you should use for resolving DNS queries on the internet.


EDIT

I think I better point out the difference between a straight nameserver, and a caching recursive nameserver or DNS Cache

A nameserver simply responds to name queries for the records that it is responsible for. In the case of an ISP, it's only for the ISP's domain and those that have been delegated to it.

A caching recursive nameserver. Is a server that'll actually resolve addresses on behalf of the one querying it that can be outside of the those delegated to the server.

BIND, the most common nameserver on the internet combines both functions. It's both a nameserver and a recursive nameserver.

There is a lot of DNS terminology going around and many names of the same thing. But basically, one just answers for it's domains, while another will answer for other domains too. That's why you can often get away with pointing your DNS queries at your IP's authoritive DNS servers. Don't do that though, use the IP's they give you or allow DHCP to do it.

So, my first answer to your question "How do I determine the IP address of you ISP's nameserver" is correct. BUT, I think you want "How do I determine the IP address of my ISP's DNS Cache?" is probably what you want.

Hopefully, the answer is found published on your ISP's website in the help or support pages. This should also be set through DHCP in your modem/router and can be viewed in it's built in web page or through the devices command line.

Matt H

Posted 2012-01-09T07:44:29.897

Reputation: 3 823

Thanks Matt, So the results show two addresses that are different than the ones in my router's control panel. Is it possible these two addresses resolve to the same address? – user784637 – 2012-01-09T08:13:24.217

1Yes it's possible, but unlikely. Most ISP's have multiple DNS servers/caching resolvers. What is reported by DNS may not be what you get in your router. – Matt H – 2012-01-09T08:18:44.090

2You don't want to use their authoritative nameservers. They will give you your ISP's view of the Internet, which is most likely not what you want. (For example, consider if one of your ISP's customers lets their domain expire. Do you want the stale records?) You want their recursive nameservers, the ones that their customers should use. – David Schwartz – 2012-01-09T08:52:43.660

utterly incorrect answer. – Alnitak – 2012-01-09T16:10:15.660

@Alnitak, not according to the question "How do I determine the IP address of my ISP's nameservers?". That's why I edited my answer yesterday at the bottom with what I think he was really wanting. So to say "utterly incorrect" is "utterly incorrect". – Matt H – 2012-01-10T01:52:11.960

It was completely obvious from the context that he meant the recursive nameservers, rather than the authoritative nameservers. And both are "nameservers", as evidenced by the syntax of resolv.conf. You're incorrect to state that the word "nameserver" without any qualifier only means an authoritative server. – Alnitak – 2012-01-10T07:38:38.390

@Alnitak, In any case, LedZeppelin hasn't stated what he wants the nameserver addresses for. Just because he was looking in resolv.conf doesn't mean he's wanting to use them for general DNS queries. The answer hinges on that. I've provided both. – Matt H – 2012-01-10T21:28:49.100

4

You can get this information from the connecting device (your router). Usually, you can find this information along with the IP address and default gateway (ISP) in the connection status. I can not tell exactly because there are many different routers models and vendors.

Khaled

Posted 2012-01-09T07:44:29.897

Reputation: 649

It's possible his router is using a publicly available DNS resolver (or even recursively resolving itself). The settings are not guaranteed to be the ISPs DNS servers. – Chris S – 2012-01-09T17:41:28.237

4

(Yes, I'm assuming that you meant proxy DNS servers. M. Schwartz is right, but it's a fair assumption given that you mentioned resolv.conf which sort of DNS server you meant.)

Ask your ISP, or look at where this information already resides on your machines.

This is one of those situations where the right answer is open your mouth and ask the relevant person. Sometimes the world of computers involves actually talking to human beings. ☺

Matt H's answer is — alas! — dead wrong for all but one paragraph buried right at the end. Don't expect your ISP to provide proxy DNS service from its content DNS servers. You don't expect proxy and content servers to be in the same place for HTTP. You don't expect submission and relay servers to be in the same place for SMTP. You shouldn't expect proxy and content servers to be in the same place for DNS, either. A good ISP that is security aware won't be providing DNS proxy service to the outside world.

Ask your ISP where its proxy DNS servers are. Almost always, the ISP provides this information without your asking, or without your needing to contact technical support. There'll be a welcome pack, a FAQ page on the ISP's WWW page, or (for poor quality ISPs) a we-don't-understand-you-non-Windows-users-so-here's-a-dump-of-technical-gibberish WWW page with this information in, somewhere.

Of course, your router almost certainly has a forwarding proxy DNS server in it, configured to use the DNS servers that your ISP gave to it via DHCP. If you can access the information about the DHCP lease that is on the WAN side of your router from your router's configuration utility, you can just read the IP addresses from it.

Further reading

JdeBP

Posted 2012-01-09T07:44:29.897

Reputation: 23 855

"A good ISP that is security aware won't be providing DNS proxy service to the outside world." - I guess that's the majority of them. Anyhow, they can publish these but firewall them off to those not on their network. – Matt H – 2012-01-10T02:04:47.290

You're confused, Matt H. If something were firewalled, it wouldn't qualify as being provided to the outside world. – JdeBP – 2012-02-03T19:42:40.923

0

You can try:

dig whoami.akamai.net

which will return the IP address that the name server received the DNS query from as an A record in the response. Or perhaps open this page in your browser: http://whatsmyresolver.stdlib.net

Louis Mamakos

Posted 2012-01-09T07:44:29.897

Reputation: 11