This is a fairly old thread but I thought I'd throw my own experience
in. I'm using 16.04.2, and the breakage happened when I last did a
system update (about a week ago). Previously, it was working perfectly
with the following configuration:

1. uninstalled resolvconf
2. Added 'dns=dnsmasq' to /etc/NetworkManager/NetworkManager.conf
3. Using Cisco compatible (vpnc) VPN

My resolv.conf has always used '127.0.1.1', and name resolution via
dnsmasq worked fine on or off the VPN. Since the upgrade, dnsmasq name
resolution is broken. If I 'sudo pkill dnsmasq', NetworkManager just
dumps all of the DNS server entries into /etc/resolv.conf and removes
127.0.1.1 (thus temporarily fixing the issue).

If I strace dnsmasq, I can it hitting my local DNS servers (never the
VPN DNS servers) but it still never gets an answer, even for something
like 'www.google.com'.

Here's something weirder. I can start the dnsmasq service (sudo
systemctl start dnsmasq.service) it binds to 127.0.0.1 (NetworkManager-
owned dnsmasq uses 127.0.1.1). This works PERFECTLY. I can dig
@127.0.0.1 for pretty much any host on the internet or the VPN and I get
an answer.

The two processes run different commands:
Systemd Service:
/usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7 
/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service 
--trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5

NetworkManager owned service:
/usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces 
--pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 
--cache-size=0 --conf-file=/dev/null --proxy-dnssec 
--enable-dbus=org.freedesktop.NetworkManager.dnsmasq 
--conf-dir=/etc/NetworkManager/dnsmasq.d

If I edit the /etc/resolv.conf and 127.0.0.1 as a nameserver and
everything is fine.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1636395

Title:
  dnsmasq not working with OpenVPN

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1636395/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to