I'm connecting to a company network on Lubuntu 15.10 with vpnc either on terminal or via the network manager. Sometimes I can reach the intranet hosts fine, then suddenly they are gone. Then they come back. I don't change anything on the settings, my connection is otherwise stable. It's very frustrating.
I can usually always reach them via their ip but not their host name. Here is the output of dig only 5 minutes apart, one time it fails the other time it doesn't.
; <<>> DiG 9.9.5-11ubuntu1-Ubuntu <<>> some.intranet.host ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7423 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1280 ;; QUESTION SECTION: ;some.intranet.host. IN A ;; ANSWER SECTION: some.intranet.host. 3500 IN A 10.0.20.107 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Dec 10 18:46:17 CET 2015 ;; MSG SIZE rcvd: 65
; <<>> DiG 9.9.5-11ubuntu1-Ubuntu <<>> some.intranet.host ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 17766 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1280 ;; QUESTION SECTION: ;some.intranet.host. IN A ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Dec 10 19:06:35 CET 2015 ;; MSG SIZE rcvd: 49
I'm not good with network setup and struggle to debug it. The content of my resolv.conf when connected to the vpn:
# 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 intranet.host intranet fritz.box
ifconfig tun0 tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:172.16.0.138 P-t-P:172.16.0.138 Mask:255.255.255.0 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1412 Metric:1 RX packets:46575 errors:0 dropped:0 overruns:0 frame:0 TX packets:36452 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:45875777 (45.8 MB) TX bytes:4059895 (4.0 MB)
Despite deactivating dnsmasq I can see a running process after reboot and my resolv.conf still holds 127.0.0.1 as nameserver. After I kill the process I cannot resolve web addresses anymore. I assume I would need to take out the nameserver from resolv.conf manually then?
$ grep dnsmasq /etc/NetworkManager/NetworkManager.conf #dns=dnsmasq $ ps aux|grep dnsmas dnsmasq 1730 0.0 0.0 49580 3052 ? S 16:26 0:00 /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