On 22/05/14 21:53, Nic Ferrier wrote: > 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@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? >
First thing is to set --log-queries, to get an idea what's actually happening to your test query. I'd also simplify things and remove the "@tun0" for a start. "but only after a clean reboot" I'm not sure I understand this: what happens when you run the command for the second time? Cheers, Simon. > > Nic Ferrier > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss