Identifying Upstream DNS Servers for DNSMasq

If you use dnsmasq as a local D.N.S. cache (Ubuntu, etc.), you may wonder why all name queries appear to be filled by 127.0.0.1. That's because DNSMasq is querying upstream name servers and storing results in memory for faster repeat lookups. If you're looking for the upstream server addresses, you can find them in the syslog (generally /var/log/syslog). Just grep for dnsmasq until you find the nameservers in the log. DNSMasq is configured by the network manager via DBUS on modern Ubuntu distributions.

If you want more detailed information about DHCP configuration, including upstream D.N.S. servers, you can use the nmcli utility:

nmcli dev list iface eth0

This will list all sorts of details about the interface (eth0 here), including the DHCP configuration details.