Dynamic OpenVPN Network with multiple droplets and configurations
The short version:
Is it possible to have dynamic OpenVPN configurations based on the client profile that is connected to it?
The long version:
I was able to successfully set up an OpenVPN server on Ubuntu 16.04 with the help of this awesome tutorial:
I have been using the VPN service with my computer since a couple of days and everything works amazingly well. I am still relatively new to the VPN server world, but I would like to try to improve the setup for my private use.
I followed this tutorial below to set up Pi Hole for DNS based Ad blocking:
This worked also without many issues, almost too well. However, sometimes I would not like to use it. Then I usually connect via SSH and change the DNS “dhcp-option” lines back to Google’s nameservers. This was the first time when I wondered if I could control the OpenVPN configuration based on the client profile that is connected to it? In best case I would have two profiles that utilize different OpenVPN configurations. Is this possible?
Secondly, due to my local internet connection, I noticed that the connection between my computer and the VPN (in another country) is sometimes very slow. It would be amazing if I could create a droplet in a region closer to my location, essentially resulting in this set up.
My computer -> VPN Connection -> Droplet 1 (close to my region) -> VPN Connection -> Droplet 2 (in target region) -> Default or VPN Connection -> Target Service
I assume that I could set up a OpenVPN server and client in Droplet 1 running at the same time. That would create a network as outlined above. But again I have the big question, if I could create multiple client profiles and depending with which profile I connect, I could control if I use the network as outlined above or maybe directly connect with Droplet 1 to the target service. Essentially is it possible to have dynamic OpenVPN configurations based on the client profile that is connected to the service?
With my beginner knowledge, I read that Tinc supports multiple nodes easily, but at the same time many users seem to prefer OpenVPN over Tinc.
Any help, even just links that help me to better understand the possibilities.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×