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_key
scriptbash 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 sceptre
Note: You will need to
workon sceptre
every time you want to use Sceptre -
Install Sceptre
pip install sceptre
- Set the
owner_name
andowner_email
values inconfig/vpn/network.yaml
which will be used to tag the resources - Set the
vpn_admin_user
andvpn_admin_pw
values inconfig/vpn/openvpn.yaml
which you will use to log in to the VPN - Set the
key_pair
value inconfig/vpn/openvpn.yaml
to the name of the key pair you created earlier - Edit the
region
value inconfig/vpn/config.yaml
andconfig/vpn/openvpn.yaml
to 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