Use remote DNS servers when connected via OpenVPN

  • I have succesfully set up OpenVPN and now when I connect to a remote network (which has DNS servers with a namespace) I cant't resolve any names in this network. When I am connected to the Internet, my ISP gives me it's DNS via DHCP, but how do a access DNS namespace when I'm connected to this remote network?

  • You set the relevant DHCP option in the OpenVPN server config (DHCP-Opt.: DNS-Server).

    If this is a site-to-site, I've been able to do it by using DNS Forwarder on my LAN, and overriding domain.local so that it uses the remote DNS server for that domain, but it doesn't sound like this is what you want. If you are using site-to-site let me know and I'll try to be more detailed.

  • No, this is a regular client to server VPN. I've set up DNS server manually and all worked. Now I wonder how do I set up a default gateway for VPN connection…