Create an OpenVPN server on a VPS using vagrant.
This project is meant to quickly spin up an optimally configured OpenVPN server with downloadable, sane client configs. It performs the following functions:
Install vagrant
Install vagrant plugins
vagrant-rsync-back Used to sync the client ovpn and cert files back to the host from the droplet.
vagrant plugin install vagrant-rsync-back
vagrant-digitalocean Only required if using the DigitalOcean cloud provider.
vagrant plugin install vagrant-digitalocean
vagrant-lightsail Only required if using the Amazon Lightsail cloud provider.
vagrant plugin install vagrant-lightsail
Create an account with a supported cloud provider and acquire credentials.
After creating an account, a Personal Access Token is required.
After creating an account, a set of Access Keys is required.
All configuration options are stored in the file config.yaml
. Each
config option has an accompanying comment. Modify the config.yaml
file as needed for user specific cases. The only required options are
the cloud provider authentication tokens or keys. Only one cloud
provider needs to be configured.
vagrant up
vagrant rsync-back
vagrant up
command.vagrant rsync-back
command will retrieve the generated./client-configs
directory on the local host.Once the client.ovpn
file has been acquired by either of the
mechanisms described above it can be imported into most OpenVPN client
softwares. A short, incomplete list follows:
./client-configs
directory before running vagrant up again.vagrant
ssh key-pair already exists in your DigitalOceanprovider.ssh_key_name
variable from theVagrantfile
.