I have latest clean Ubuntu 14.04.1 64-bit from official website installed in Virtualbox. I connect to a VPN network using vpnc that sets 2 DNS servers using DHCP:
user@virtual:~$ cat /etc/resolv.conf
# 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 10.88.94.1
nameserver 8.8.8.8
nameserver 10.40.0.1
Where 10.88.94.1
and 8.8.8.8
are returned by vpn dhcp and 10.40.0.1
is returned by lan dhcp. The first DNS server returned by vpn dhcp is configured as authoritative, non-recursive name server for some internal names.
The problem is - Ubuntu somehow ignores the authoritative flag and discard valid response becouse it's non-recursive:
user@virtual:~$ nslookup
> video.something.com
;; Got recursion not available from 10.88.94.1, trying next server
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: video.something.com
Address: 180.112.94.1
As tcpdump clearly shows the answer from first DNS server have 'authoritative' flag set, but somehow it is ignored ('*' in second response is for "authoritative", '-' is for "non-recursive"):
13:23:44.505098 IP 10.40.130.209.44159 > 10.88.94.1.domain: 63790+ A? video.something.com. (32)
13:23:44.506285 IP 10.88.94.1.domain > 10.40.130.209.44159: 63790*- 1/0/0 A 10.88.94.12 (48)
13:23:44.506390 IP 10.40.130.209.45437 > 8.8.8.8.domain: 63790+ A? video.something.com. (32)
13:23:44.608414 IP 8.8.8.8.domain > 10.40.130.209.45437: 63790 1/0/0 A 180.112.94.1 (48)
Same setup works as expected (first DNS result is used) on both Windows and OSX. But not on Ubuntu. Is it something i can fix in Ubuntu in order for authoritative responses to be processed crrectly regardless of "non-recursive" flag or it is completely broken and where is nothing i can do?