On Wed, Mar 29, 2017 at 09:43:33AM -0500, Joel Whitehouse wrote:
> I'm running ubuntu 14, which uses dnsmasq as a local resolver on 127.0.1.1.
> When I issue a dig query, dig informs me it's using 127.0.1.1 as its
> resolver:
> 
> ;; Query time: 3 msec
> ;; SERVER: 127.0.1.1#53(127.0.1.1)
> ;; WHEN: Wed Mar 29 09:36:06 CDT 2017
> ;; MSG SIZE  rcvd: 63
> 
> 
> However, I would like to know what host dnsmasq is using as its resolver.
> On my system, `ps ax' shows that dnsmasq is started with the command:
> 
> /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts
> --bind-interfaces
> --pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid
> --listen-address=127.0.1.1 --conf-file=/var/run/NetworkManager/dnsmasq.conf
> --cache-size=0 --proxy-dnssec
> --enable-dbus=org.freedesktop.NetworkManager.dnsmasq
> –conf-dir=/etc/NetworkManager/dnsmasq.d
> 
> 
> Both the file /var/run/NetworkManager/dnsmasq.conf and the directory
> /etc/NetworkManager/dnsmasq.d/ are empty, so it's likely that dnsmasq is
> receiving its resovlers from Network Manager over the dbus interface.
> 
> 
> Is there any way to get dnsmasq to log when it issues a new query to a
> resolver?
> 
This is basically the same question that I asked a few weeks ago, the
answer was to look in syslog for dnsmasq messages.  You should be able
to find messages like:-

    syslog.1:Mar 28 09:08:53 t430 dnsmasq[1501]: setting upstream servers from 
DBus
    syslog.1:Mar 28 09:08:53 t430 dnsmasq[1501]: using nameserver 
192.168.1.2#53(via wlan0)
 
(On my LAN there's a Raspberry Pi at 192.168.1.2 running dnsmasq for
local name resolution)

What I see on the Raspberry Pi at startup is:-

    Mar 29 16:48:35 pi dnsmasq[2086]: using local addresses only for domain 
zbmc.eu
    Mar 29 16:48:35 pi dnsmasq[2086]: reading /etc/resolv.conf
    Mar 29 16:48:35 pi dnsmasq[2086]: using nameserver 208.67.220.220#53
    Mar 29 16:48:35 pi dnsmasq[2086]: using nameserver 216.146.36.36#53
    Mar 29 16:48:35 pi dnsmasq[2086]: using nameserver 212.159.13.49#53

However I think in your case you should be looking for the 'setting
upstream servers' message.

-- 
Chris Green

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to