1

I've looked for a while in the internet, and searched on how can i find out which Domain Name System server my machine is using.

All the links said that i have to look in the file /etc/resolv.conf, but when i open this file, the only address I see is 127.0.0.1 !!

What is happening here ?! How can my machine be the DNS server i'm using ?

PS : I'm using ubuntu 15.10 (with Linux version > 4)

1
  • Your DNS would either be a third-party server, your own DNS server, your router, or your ISP's server. Your router's DNS would either be ( your ISP, a third-party, or your own DNS server ). – Ramhound Feb 17 '16 at 21:15
1

In addition to @ams answer onevway to find the parent nameserver would be to see where the file describing it (ie version of resolv.conf) is in /etc/dnsmasq.conf

Another way would be to look at the data - run ”tcpdump -n -i all port 53” in one window and brose/ping/ cause dns traffic in another, then examine the captured data.

Its probable that the dns server being used is your routers ip - this is normally the case in small networks.

2

Ubuntu uses a local DNS cache called dnsmasq for various reasons, so yes, your machine is a DNS server for normal lookup purposes.

If you want to see what the real DNS settings are then the best way is to look at the NetworkManager GUI, if you have a desktop machine, or simply check the system logs on a server. The best search term is probably "nameserver".

There may be another, autogenerated resolv.conf somewhere under /run or /var/run, but I'm not sure where it would be on 15.10 as the most recent Ubuntu I have handy is 14.04.

3
  • Thanks bro. I checked both the files resolv.conf in the /run and /var/run directory, and they both tells the same thing as the usual resolv.conf file. And I didn't find where to see the DNS server used in the NetworkManager gui. But i had more luck with the search of log files, I found the lines "nameserver '192.168.1.1' ", which means that my rooter is my default DNS server ??!! – Sidahmed Feb 17 '16 at 17:37
  • Open up the network settings, and click through to the profile page for your connection. – ams Feb 17 '16 at 17:43
  • Hmmm, it's right there on the front page for wired connections, but a bit harder to get to for wireless connections. – ams Feb 17 '16 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.