Autovpn - Create On Demand Disposable OpenVPN Endpoints On AWS

September 8, 2020

Autovpn is a script that allows the easy creation of OpenVPN endpoints in any AWS region. Creating a VPN endpoint is done with a single command that takes ~3 minutes. It will create the proper security groups. It spins up a tagged ec2 instance and configures OpenVPN software. Once the instance is configured an OpenVPN configuration file is downloaded and ready to use. There is also functionality to see which instances are running in which region and the ability to terminate the instance when done. Additional functionality includes specifying instance type, generate ssh keypairs, specify custom AMI, change login users, and more to come.

Use Case

  • Create on-demand OpenVPN Endpoints in AWS that can easily be destroyed after done only pay for what you use.


  1. Create a virtualenv:
mkvirtualenv -p python3 env/
source env/bin/activate
  1. Install dependencies by running pip install -r requirements.txt
  2. Ensure that you have an AWS .credentials file by running:
vi ~/.aws/credentials

Then type in the following and add your keys (remove the parenthesis):


Read the rest of this story with a free account.

Already have an account? Sign in

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
© HAKIN9 MEDIA SP. Z O.O. SP. K. 2023
What certifications or qualifications do you hold?
Max. file size: 150 MB.

What level of experience should the ideal candidate have?
What certifications or qualifications are preferred?

Download Free eBook

Step 1 of 4


We’re committed to your privacy. Hakin9 uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy.