I am using OpenVPN-2.4.6 clients and an OpenVPN-2.4.5 server that resides an OpenWRT(18.06.01) router.

The OVPN client connects to the server by a public DNS name of the server(i.e pubName.my.router), instead of an ip since the ip of the server is dynamic.

Can I(and how to) add a local domain entry of the server(i.e privateName.in.vpn) to the resolver of the clients?

Because OpenVPN would resolve and cache the ip of pubName.my.router before it starts connecting, I believe that the local entry added later will not disturb the traffic of OVPN own.

Basically, I think I have three questions:

  1. I'm prefer to do in a manner come with OVPN, if any(But I didn't found it).
  2. If it can not be done with OVPN, how to add such an entry into my local resolver(of a linux box)?
  3. What is the kind of the resolver of my Kubuntu box by default(So I can search more documents)?

Any suggestions or hints will be appreciated! Pls mercy a Chinese writing such an ugly English post, I wish I have expressed things correctly. Thank you anyway!

  • 1
    Typically you include in either the OpenVPN client configuration or the server configuration the IP-address of the name server that should be used by the client once successfully connected. That name server should then be able to resolve any and all (internal only) hostnames that are needed. See serverfault.com/q/416708/37681 – HBruijn Feb 5 at 11:34
  • Thanks! @HBruijn. Doing as you sugestion, let all resolving of my client will be commited to the dns server pushed by the vpn server, but I don't want to let the resolving other than "private.vpn.server" be passed through the vpn also, because the vpn link is just for some online db-server management, not for regular Internet traffic. – Leon Feb 5 at 14:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.