[Dnsmasq-discuss] Debugging dnsmasq on Ubuntu

Pali Rohár pali.rohar at gmail.com
Wed Mar 29 16:11:23 BST 2017


On Wednesday 29 March 2017 09:43:33 Joel Whitehouse wrote:
> 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.

Right.

> Is there any way to get dnsmasq to log when it issues a new query to a
> resolver?

I have all information in syslog.

dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21
dhclient: DHCPREQUEST of X.X.X.X on wlan0 to 255.255.255.255 port 67
dhclient: DHCPOFFER of X.X.X.X from X.X.X.X
dhclient: DHCPACK of X.X.X.X from X.X.X.X
dhclient: bound to X.X.X.X -- renewal in X seconds.
NetworkManager[1977]: <info> (wlan0): DHCPv4 state changed preinit -> bound
NetworkManager[1977]: <info>   address X.X.X.X
NetworkManager[1977]: <info>   prefix X (X.X.X.X)
NetworkManager[1977]: <info>   gateway X.X.X.X
NetworkManager[1977]: <info>   nameserver 'X.X.X.X'
NetworkManager[1977]: <info>   domain name 'X'
NetworkManager[1977]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
NetworkManager[1977]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Commit) started...
NetworkManager[1977]: <info> (wlan0): writing resolv.conf to /sbin/resolvconf
dnsmasq[4160]: setting upstream servers from DBus
dnsmasq[4160]: using nameserver X.X.X.X#53

So when NetworkManager via dbus reconfigure list of nameservers then
dnsmasq logs them into syslog.

-- 
Pali Rohár
pali.rohar at gmail.com



More information about the Dnsmasq-discuss mailing list