5

Ubuntu 16.04, Acer i5, 6GB, 256GB-SSD.

Hi, I have pi-hole on a Pi and set my router DNS to point to it's IP address as described by the pi-hole install stuff.

The Internet access seems to be working OK, but, from my Ubuntu I'd like to see which DNS server is being used beyond the Pi. When I set pi-hole up, I selected DNSWatch as the default downstream (or upstream) but would like to see that it is being used.

Also, I'd like to see what DNS is being used when pi-hole is turned off. There is a delay of about 5-seconds and then my Acer/Router finds a DNS server to use.

I can add 2 more DNS servers in my dd-wrt router so was thinking of adding OpenDNS as a fall back if the pi-hole is down.

Is there a way to query the Pi, or my Ubuntu to get the outside DNS?

LinuxFerLife
  • 432
  • 1
  • 7
  • 18
  • 2
    Possible duplicate of [Command-line to list DNS servers used by my system](https://askubuntu.com/questions/152593/command-line-to-list-dns-servers-used-by-my-system): `nmcli device show | grep DNS` – Pablo Bianchi Apr 22 '19 at 02:54

2 Answers2

5

If you are running a more modern Linux and want an authoritative answer, run the command:

systemd-resolve --status

It will show all adapters and what each adapters DNS server is. So you can troubleshoot OpenVPN problems and others.

pomsky
  • 67,112
  • 21
  • 233
  • 243
John6of6
  • 51
  • 1
  • 2
1

simply ssh to your pi and ask with nslookup...

ssh pi@pi # for exemple

then

~$ nslookup
> server
Default server: 208.67.222.222
Address: 208.67.222.222#53
> ^C
~$
cmak.fr
  • 8,411
  • 2
  • 29
  • 45
  • Thank you, but I get _Default server: 127.0.0.1_ and _Address: 127.0.0.1#53_ – LinuxFerLife May 05 '18 at 17:44
  • I should mention, that I get that for both my laptop in Terminal and **both** SSH to the Pi **and** when using the keyboard and monitor directly to the Pi. – LinuxFerLife May 05 '18 at 18:58
  • find wich server program is listenning on port 53, then read his config. > netstat -antup | grep 53 – cmak.fr May 06 '18 at 08:10