I have an OpenVPN server and some clients that connect to it, for example:

  • host1 (at location1)
  • host2 (at location2)
  • laptop (my travel machine)

Is it possible to configure routing in such a way that when I'm at a remote location and connect to the VPN, I can access host1 and host2 through the VPN connection, but when I'm at location1 access to host1 is direct and does not go through the VPN? Similarly, when I'm at location2 access to host2 is on the local network without having to traverse the VPN and access to host1 continues to be through the VPN?

Is there a DNS, or some naming convention, to make this possible?

  • Should be automatic, if the Network is properly setup. Is your VPN always on? – Abu Zaid Jan 6 at 14:32
  • How do I properly setup the network to make this automatic? – berto Jan 7 at 2:42

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.