Openvpn dns server not resolving forwarded DNS lookups after connecting, only local

binddomain-name-systemopenvpn

I am using OpenVPN server (on an Ubuntu server 14.04) with Mac OS X Yosemite client (using TunnelBlick v 3.50 build 4265).
It works well except for the DNS server from the VPN server which although it is being set on the client, it is only resolving the DNS queries for the local intranet and not being forwarded to the resolver for internet lookups. The same DNS server (bind) works fine in the local intranet and on the OpenVPN server.

Here is one dig output once the vpn is connected.

$ dig -x www.google.com

; <<>> DiG 9.8.3-P1 <<>> -x www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 12157
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;com.google.www.in-addr.arpa.   IN  PTR

;; Query time: 1884 msec
;; SERVER: 10.0.0.9#53(10.0.0.9)
;; WHEN: Fri May  8 10:32:22 2015
;; MSG SIZE  rcvd: 45

Best Answer

Another solution, add recursion to 10.1.0.0/24 net, by adding this line in /etc/bind/named.conf.options, as follow:

allow-recursion { 10.1.0.0/24; };
Related Topic