Comments on: Build a private VPN Server on Amazon’s EC2 Some not-so random thoughts about this small IT World Mon, 25 Jan 2016 12:47:01 +0000 hourly 1 By: mikola Mon, 09 Nov 2015 13:17:09 +0000 thanks for great article!
i followed instructions and it works 🙂

can you please tell me how is it possible to add more VPN users or to use the same credentials on multiple devices?

By: Jason Thu, 23 Apr 2015 15:59:14 +0000 You can setup your own VPN server on AWS in 10 minutes. It uses an Amazon service called cloudformation. no need to SSH and so on

By: Vyom Fri, 24 Oct 2014 07:50:01 +0000 What kind of Bandwidth and throughput have you seen using this solution.

I have a router which supports IPsec/L2TP and I was wondering if I can use the solution to stream movies 🙂 from India

By: Mael Tue, 30 Sep 2014 10:17:08 +0000 Hi Seb,

Great post!

Beware of the environment variables though:



By: Fang Sun, 21 Sep 2014 15:00:07 +0000 Hello from Shanghai.

In China visiting the gf.

Using her company’s two vpns and everything ten clicks I’m able to read/load a gmail.

Before I chunk out real change I’m going to to give your tutorial a go.

Thanks in advance…

By: Sébastien Stormacq Tue, 12 Aug 2014 09:55:13 +0000 Hello Tom,

All traffic going out of an Amazon EC2 instances to the Internet is charged $0.12 GB/Month (First GB is free). Check the “Data Transfer” section at


By: Tom B Tue, 12 Aug 2014 01:47:59 +0000 I’ve been using AWS as a dovecot/postfix mail server for my domain. I was wondering if there was any extra charge for all the data going through the site beyond the regular AWS? would hate to turn this on and double my bill, or worse.

I was thinking of using it to secure my router (mikrotik) to the internet connection so that anything TWC does they can’t figure out what my packet types are.

By: Jeremy Glover Tue, 01 Apr 2014 03:11:00 +0000 The code from GitHub is what I was using. My guess is that Amazon changed the output with the newest version of the AWS CLI which is why the script can’t parse the output correctly now.

Specifically, I think line 28 of isn’t working right now with the “grep INSTANCES” portion since AWS returns a request ID instead of the instance ID.

Let me know if you need any more info and keep up the good work 🙂

By: Sébastien Stormacq Mon, 31 Mar 2014 19:48:48 +0000 Hello,

These scripts are indeed one year old and I should do some cleaning on it. Thanks for having spotted this!

I do maintain an updated version on GitHub. This updated version has been modified to use AWS CLI, check

Thank you for your feedback !


By: Jeremy Glover Wed, 26 Mar 2014 00:50:55 +0000 Thank you so much for the scripts! I got it working, but had to manually get the IP from the AWS console. I’m using version 1.3.3 of the AWS CLI tools and I did some debugging.

When I run the following command, the output is a “requestId”, not an “Instances”, and so the script just stays in a loop because the server status can never be polled successfully as it is.

The command is:
aws ec2 run-instances –image-id $AMI_ID –key-name $KEY_ID –security-groups $SEC_ID –instance-type t1.micro –user-data file://./$BOOTSTRAP_SCRIPT –output text

And the response is a GUID. Example: 87be1dd3-f489-4fdc-9681-fe5514b0e928.

I removed the “–output text” from the command so I could see the full response and this is what I got on a subsequent run of the command.

“Instances”: [],
“Groups”: [],
“requestId”: “77d23a97-aa5d-4649-8cb7-33a878d5f4e3”

It looks like Amazon changed it so maybe you have to poll AWS using the requestId and then it’ll give you the Instances?

Please take a look and let me know if you need any more info.

Thanks for the great work!