2

I have set up OpenVPN and BIND on a VPS and have a few questions regarding DNS resolving.

I have configured bind to push 10.8.0.1 to my client and set the nameserver in resolv.conf to 127.0.0.1.

The vpn tunnel and DNS seems to all be working fine a resolving however im confused as to how the DNS queries are begin resolved if i set 127.0.0.1 as the nameserver.

Would i be correct in assuming the the root DNS nameservers are being queried directly?

I cant seem to find any other directory with any specific nameservers set.

Thanks

  • 1
    If you set the nameserver to 127.0.0.1 it will be resolved by a DNS server on your local system. What exactly this DNS server does is unknown from your description, i.e. it might use the root servers through the VPN but it might also use the ISP's DNS servers bypassing the VPN. Apart from that pushing only an IPv4 route makes any IPv6 traffic bypass the VPN. – Steffen Ullrich Jan 29 '17 at 7:09
  • How would the DNS bypass my vpn if the nameserver 127.0.0.1 is on my server? If i run a test on ipleak.net all my traffic seems to be going through my tunnel fine. I have disable ipv6 completely in both my client and server. Would there be a way to find which dns my server is using past the local address? from my understanding root dns servers cannot be queried directly? correct me if im wrong – PjMpire Feb 1 '17 at 7:16
  • This fully depends on your unknown local system configuration. You might use tcpdump or wireshark to look at the traffic to find out how DNS lookups are done on your system. – Steffen Ullrich Feb 1 '17 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.