I'm using ubuntu 16.04 and I have setup an openvpn connection and a tun0 interface is being created. The vpn connects successfully. At first I could visit some of the URLs through the VPN and but the page took 10-20 seconds with the browser just waiting for a connection. Then after unplugging my computer from the network and a restart the web pages just just stopped working all together. I ran
nmcli dev show to compared the results to some on debian linux whose machine is working fine through open vpn and I saw that:
When openvpn is connected but no webpages load I see:
:~$ nmcli dev show GENERAL.DEVICE: tun0 GENERAL.TYPE: tun GENERAL.HWADDR: GENERAL.MTU: 1500 GENERAL.STATE: 100 (connected) GENERAL.CONNECTION: tun0 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/14 IP4.ADDRESS: 10.146.129.226/32 IP4.GATEWAY: 10.146.129.225 IP4.DNS: 127.0.0.1 IP6.ADDRESS: fe80::27f8:bc23:5e18:b6ba/64
When openvpn is connected but the webpages take 10-20 seconds to load I see a bunch of IP4.ROUTEs being configured:
:~$ nmcli dev show GENERAL.DEVICE: tun0 GENERAL.TYPE: tun GENERAL.HWADDR: GENERAL.MTU: 1500 GENERAL.STATE: 100 (connected) GENERAL.CONNECTION: tun0 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/0 IP4.ADDRESS: 10.146.129.226/32 IP4.GATEWAY: 10.146.129.225 IP4.ROUTE: dst = 22.214.171.124/32, nh = 10.146.129.225, mt = 50 IP4.ROUTE: dst = 126.96.36.199/32, nh = 10.146.129.225, mt = 50 .... IP4.ROUTE: dst = 188.8.131.52/32, nh = 10.146.129.225, mt = 50 IP4.ROUTE: dst = 184.108.40.206/32, nh = 10.146.129.225, mt = 50 IP4.DNS: 127.0.0.1 IP6.ADDRESS: fe80::71d2:5709:5536:b3fc/64 IP6.GATEWAY: For the person whose openvpn is working on debian 9.4 IP4.DNS entries are being configured while mine from above only says IP4.DNS: 127.0.0.1: :~$ nmcli dev show GENERAL.DEVICE: tun0 GENERAL.TYPE: tun GENERAL.HWADDR: (unknown) GENERAL.MTU: 1500 GENERAL.STATE: 100 (connected) GENERAL.CONNECTION: tun0 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/224 IP4.ADDRESS: 10.146.129.242/32 IP4.GATEWAY: 10.146.129.241 ... IP4.ROUTE: dst = 220.127.116.11/32, nh = 10.146.129.241, mt = 50 IP4.ROUTE: dst = 18.104.22.168/32, nh = 10.146.129.241, mt = 50 IP4.DNS: 10.146.128.8 IP4.DNS: 22.214.171.124 IP4.DNS: 126.96.36.199 IP4.DNS: 188.8.131.52 IP4.DNS: 184.108.40.206 IP4.DNS: 220.127.116.11 IP6.ADDRESS: fe80::35a6:a424:c5b6:bf7f/64 IP6.GATEWAY: --
Their /etc/resolve conf file also has nameserver entries and looks like this:
# Generated by NetworkManager search teknet int.xxxx.dk dev.xxxx.dk opasia.gkl.xxxx.dk xxx.dk nameserver 10.146.128.8 nameserver 18.104.22.168 nameserver 22.214.171.124 # NOTE: the libc resolver may not support more than 3 nameservers. # The nameservers listed below may not be recognized. nameserver 126.96.36.199 nameserver 188.8.131.52 nameserver 184.108.40.206
/etc/resolve.conf file looks like:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 search teknet int.xxx.dk dev.xxx.dk opasia.gkl.xxx.dk dk.eng.xxx.net
I have dnsmasq running and am confused about how ubuntu 16.04 actually updates dns/name server entries. I've tried:
- Adding nameserver entries to
- Adding server entries to
- Adding dns-nameservers to
/etc/network/interfaceand doing a
- Restart network manager after making changes, but nothing seems to add dns nameserver entries to
/etc/resolve.conf. Restarting network manager with
sudo systemctl restart network-manager.servicedoes clear the manual entries I add to
etc/resolve.confwhich then seems to be rewritten when my network reconnects to what's shown above.
There's just too many places to update dns entries and I don't know which one is actually being used, is it dnsmasq, resolvconf or the dhcp script from my network or the vpn script? Can anyone point me how I should start debugging and what should be happening?
It seems like I want my nmcli dev show command to show that the tun0 interface has it's IP4.DNS entries set correctly. I just can't seem to get that to happen.