1

I'm on Lubuntu 16.04 and have problems resolving names of my company's network through VPN. It's not so clear to me what has the last say on my system dnsmasq/resolvconf/network-manager... and would really appreciate if someone helps me to find the problem.

I have entered additional nameservers through the nm-connection-editor interface:

  • 8.8.8.8 for the wifi connection that I use at home (for debugging only)
  • 10.49.191.29 for the vpn connection (not actual ip)

But seems Lubuntu does not use either nameserver that I specified in the gui:

nmcli dev show | grep DNS
IP4.DNS[1]:                             192.168.1.1

These 3 give me the correct addresses (while connected to the vpn):

nslookup internalcompany.host 10.49.191.259
nslookup google.com 192.168.1.1
nslookup google.com 8.8.8.8

While this fails (how can I still surf the web?):

nslookup google.com 
Server:     127.0.0.1    
Address:    127.0.0.1#53

** server can't find google.com: REFUSED

dnsmasq is running like:

` /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service`

/run/resolvconf/resolv.conf:

# Generated by resolvconf
nameserver 127.0.0.1
nameserver 127.0.1.1

/etc/dnsmasq.d/network-manager:

# Tell any system-wide dnsmasq instance to make sure to bind to interfaces
# instead of listening on 0.0.0.0
# WARNING: changes to this file will get lost if network-manager is removed.
bind-interfaces

/etc/NetworkManager/NetworkManager.conf:

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

enter image description here


2
  • 1
    Same problem here, with openconnect (Cisco) VPN. With journalctl -u NetworkManager -f I can see that the DNS is applied upon connecting to the VPN, but it isin't used and doesn't appear in resolv.conf. I tried adding the DNS to /etc/resolvconf/resolv.conf.d/head and running /sbin/resolvconf -u - it adds the DNS into resolv.conf and then it's used, but the default DNS server is not used therefore I can't access the internet.
    – OndroMih
    Apr 20, 2017 at 11:03
  • I found out it doesn't work for me only when I used 2 additional DNS servers - and it only didn't work for one of them. When I tried with only single additional DNS, it work for both. So now I have 2 configurations and switch between them when I need to use the other DNS.
    – OndroMih
    Apr 20, 2017 at 12:12

0

You must log in to answer this question.

Browse other questions tagged .