[Dnsmasq-discuss] dnsmasq and dbus - strange reset behaviour

Nic Ferrier nic at ferrier.me.uk
Thu May 22 20:53:53 UTC 2014


I've got ubuntu 14 and I was having a few issues with the OpenVPN
support not setting DNS properly.

So I thought I'd just use openvpn from the command line. But making it
work with ubuntu's package dnsmasq is a bit tricky.

They run dnsmasq like this!

  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

it's not possible (apparently) to do this with a config file so I've
been using the dbus.

I've got something like this:

  sudo dbus-send --system --print-reply \
        --dest=org.freedesktop.NetworkManager.dnsmasq \
        /uk/org/thekelleys/dnsmasq \
        uk.org.thekelleys.SetDomainServers "array:string:${CURRENT_DNS}/vpndomain.name/10.5.1.20 at tun0"

and it works, I get this:

  method return sender=:1.79468 -> dest=:1.79479 reply_serial=2

but only after a clean reboot, and I get:

  May 22 21:26:49 mymachine3 dnsmasq[14146]: using nameserver 10.5.1.20#53 for domain vpndomain.com

When I try and dig the name from the local dns it just times out.

I can dig from the upstream vpn side server.

So it seems like dnsmasq isn't actually obeying the server set when it's
done more than once or something?

Can anyone suggest some debugging I could do or what the problem
actually is?


Nic Ferrier



More information about the Dnsmasq-discuss mailing list