This repository contains the code to allow the deployment of your own VPN Access Server in AWS. This code uses Sceptre to deploy AWS CloudFormation templates so this means you will need an AWS account and Sceptre installed on your machine.
- Create AWS account
- Create IAM user with programmatic access & save the access keys
- Create EC2 Key Pair
- Change permissons of the private key
chmod 400 my-key-pair.pem - Install AWS CLI to your machine
- Configure AWS CLI
- Share EC2 key pair with other regions by running
region_share_keyscriptbash region_share_key.sh path/to/pem_key.pem
-
Install python & pip if you don't have it installed already
-
Install virtualenv
pip install virtualenv -
Install virtualenvwrapper
pip install virtualenvwrapper export WORKON_HOME=~/Envs source /usr/local/bin/virtualenvwrapper.sh -
Create the sceptre virtualenv
mkvirtualenv sceptre -
Select the sceptre virtualenv to work on
workon sceptreNote: You will need to
workon sceptreevery time you want to use Sceptre -
Install Sceptre
pip install sceptre
- Set the
owner_nameandowner_emailvalues inconfig/vpn/network.yamlwhich will be used to tag the resources - Set the
vpn_admin_userandvpn_admin_pwvalues inconfig/vpn/openvpn.yamlwhich you will use to log in to the VPN - Set the
key_pairvalue inconfig/vpn/openvpn.yamlto the name of the key pair you created earlier - Edit the
regionvalue inconfig/vpn/config.yamlandconfig/vpn/openvpn.yamlto the region you want to launch in - Launch the environment using Sceptre
sceptre launch-env vpn - Connect to the VPN
- Navigate to the EC2 console of the region you just launched the OpenVPN Access Server in.
- Select the OpenVPN instance and copy its public IP address.
- Follow these instructions to learn how to connect to the VPN