Bug 1390834

Summary: dns resolution issue with NetworkManager + dnsmasq + openvpn
Product: [Fedora] Fedora Reporter: Stefan Assmann <sassmann>
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: bgalvani, dcbw, fgiudici, lkundrak, psimerda
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-02 07:04:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Assmann 2016-11-02 04:15:43 UTC
Description of problem:
I'm using dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf to get split DNS when connecting to VPN (openvpn). This works fine the first time I connect to VPN after booting the machine. using NM to connect to the VPN.
root@x230:~ > ping -c1 beaker.en,ineering.redhat.com
PING beaker-server.host.prod.eng.bos.redhat.com (10.19.208.8) 56(84) bytes of data.
64 bytes from beaker-server.host.prod.eng.bos.redhat.com (10.19.208.8): icmp_seq=1 ttl=53 time=258 ms

However if I stop the VPN and restart the VPN it no longer resolves any DNS queries on the VPN
root@x230:~ > ping -c1 http://beaker.engineering.redhat.com
ping: http://beaker.engineering.redhat.com: No address associated with hostname

I noticed that if I kill dnsmasq and NM automatically respawns it the DNS queries start to work (without any change to the VPN).

root@x230:~ > ping -c1 beaker.engineering.redhat.com
ping: beaker.engineering.redhat.com: No address associated with hostname
root@x230:~ > pkill dnsmasq
root@x230:~ > ping -c1 beaker.engineering.redhat.com
PING beaker-server.host.prod.eng.bos.redhat.com (10.19.208.8) 56(84) bytes of data.
64 bytes from beaker-server.host.prod.eng.bos.redhat.com (10.19.208.8): icmp_seq=1 ttl=53 time=252 ms

Version-Release number of selected component (if applicable):
NetworkManager-1.2.4-3.fc24.x86_64
NetworkManager-openvpn-1.2.4-2.fc24.x86_64
dnsmasq-2.76-1.fc24.x86_64

How reproducible:
always

Steps to Reproduce:
1. start VPN
2. stop VPN
3. start VPN
4. ping host on VPN

Actual results:
dns resolution fails

Expected results:
dns resolution succeeds

Additional info:

root@x230:~ > cat /etc/resolv.conf
# Generated by NetworkManager
search redhat.com
nameserver 127.0.0.1

Comment 1 Beniamino Galvani 2016-11-02 07:04:31 UTC
This is a known problem is dnsmasq and the fix is already upstream. See bug 1373485 for more details.

*** This bug has been marked as a duplicate of bug 1373485 ***