AWS云搭建安全简单免费的VPN服务


Reference resources:
https://www.webdigi.co.uk/blog/2015/how-to-setup-your-own-private-secure-free-vpn-on-the-amazon-aws-cloud-in-10-minutes/

Creating your Private VPN Server

================================

1. Setup a free Amazon (AWS) cloud account.
Visit http://aws.amazon.com/free/ and complete the signup. If you already have an Amazon AWS account then please login and follow on.

  1. Select a region for your VPN server.
    The VPN server can be in the following locations – North Virginia, Oregon, California, Ireland, Frankfurt, Singapore, Tokyo, Sydney, São Paulo. All your traffic will flow through the region that your VPN server is hosted. The selected region will appear in bold next to your name on the top header bar.

AWS-Region

3. Open CloudFormation in the Amazon AWS control panel.
You can follow this link or click on the cloud formation link from the AWS page.

Cloud-Formation

4. Start creating a stack with CloudFormation. Click on “Create Stack” button on top of the page.

CloudFormation-CreateStack

5. Setting up the template for the stack
Enter a stack Name say MyVPN (you use what you like). Then under Template, Source, select “Specify an Amazon S3 template URL” and paste in this URL https://s3.amazonaws.com/webdigi/VPN/Unified-Cloud-Formation.yaml and then click Next.

CloudFormation-SelectTemplate

6. Setup VPN access details in the Specify Parameters page
Speed: Select Standard.VPN-Free and this should do for most use cases. We have also added faster server options if you ever require VPN with multiple simultaneous video streams and so on.
Username: VPN username for your VPN server.
VPNPassword: VPN password for your VPN server.
VPNPhrase: VPN passphrase the L2TP – IPSEC connections on your VPN server.
CloudFormation-SpecifyParameters

7. You will then be taken to the Options section and you can click Next without having to fill anything on this page.

CloudFormation-Options

Finally, you will see a review page as in the screenshot below. Just click on Create and the VPN server will be created in a few minutes.
CloudFormation-Review

8. Monitoring the VPN server creation

You will see a page which shows that the status is Create in progress as below.

CloudFormation-CreateInProgress

Within about 2 minutes you should see that the stack create in progress is complete as below.

CloudFormation-CreateComplete

9. Obtain the private VPN server IP address

Once the stack status shows as CREATE_COMPLETE you can then click on the Outputs tab.

CloudFormation-OutputsTab

Now in the outputs tab you can see the server IP address as highlighted below.

CloudFormation-Outputs

Awesome, you should now have your private VPN server running in the IP address shown in the outputs tab. Please note that the IP address is unique for your server and you need it to connect your devices. Now your VPN server is ready and let us connect to it.

Connecting to your private VPN server

=====================================

Each device has its own configuration to connect to a VPN server. We have added a how to for a few popular devices below. Please note that your private VPN server supports both PPTP and L2TP with IPSEC. This means that your VPN server supports most devices out there including older routers. You can connect to your VPN server with either PPTP or L2TP as supported by your device.

The parameters for your VPN connection are
Server Address: The IP address from step 9 and this is unique for your VPN server.
VPN Username & Password: From step 6 above. Same username & password for PPTP / L2TP VPN.
VPN Passphrase: You set this up on step 6 above and only have to be used with an L2TP connection.

Examples below use PPTP but you can also find out how to setup L2TP with IPSEC on various websites.

1. Setting up VPN on an Android 5.0
Android-VPN-Step1
Android-VPN-Step2
Android-VPN-Step3
Android-VPN-Step4
Android-VPN-Step5

2. Setting up VPN on a MAC with the PPTP connection.
*UPDATE Nov 2016: PPTP is not supported on macOS Sierra so follow point 3 using L2TP over IPSEC (below).
*

First open System Preferences, then Network and follow the screenshots below.
MAC-VPN-Step1
MAC-VPN-Step2
MAC-VPN-Step3
MAC-VPN-Step4
MAC-VPN-Step5
MAC-VPN-Step6
MAC-VPN-Step7

3. Setting up VPN on a Mac with L2TP over IPSec
UPDATE Nov 2016: L2TP is recommended now. Follow instructions as in PPTP after you setup up to point 8 below.

l2tp-1

l2tp-2

l2tp-3

Follow other steps as outlined in the above section on PPTP to finish the setup.

4. Setting up VPN on Asus RT-AC68U router

ASUS-RT-AC68U-VPN

5. For all other devices please search for Setting up PPTP VPN on my iphone and so on. You can also setup an L2TP IPSEC VPN which is more secure but might not be supported on all devices.

Tips / Suggestions

==================

1. If you want to delete your VPN server then just open CloudFormation on AWS. Make sure you select the same region that you created your VPN server. Then just click on Delete Stack button and your private VPN server will be removed.

CloudFormation-DeleteStack

2. You can have multiple VPN servers all over the world. You just have to repeat the setup steps in this guide by selecting different regions. Please note that AWS free tier gives you a total of 750 hours a month free. You can also delete and create VPN servers as frequently as you want.

3. Setting up a VPN connection on your router will allow all devices on its network to use the VPN server. This could be beneficial for use with AppleTV / Chromecast and any device that does not support a VPN.

4. You can test if your VPN connection is active by just searching for “what is my ip address” on your favourite search engine. The IP address reported will be that of your private VPN server if everything is your connection is enabled. If your VPN connection is not enabled or if the VPN server settings are not complete then it will report your ISP’s IP address.

5. We love your feedback and let us know if you face any issues in the comments section below or on our github page for setting up your private VPN on AWS .


文章作者: SakuraGaara
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 SakuraGaara !
 上一篇
kubernetes Pod资源清单注解 kubernetes Pod资源清单注解
创建资源的方法:定义yaml格式提供配置清单,将资源清单提交给apiServer apiServer可自动将其转换为json格式,而后提交给Scheduler(集群中的调度器) 由Scheduler完成调度,调度目标节点完成创建,并启
2019-04-18
下一篇 
Nginx访问控制(持续更新) Nginx访问控制(持续更新)
NGINX实现IF语句里的AND,OR多重判断正常清空下使用allow,deny 可以完成,但是对于同时过滤ip和页面,就无法按照正常规则去实现 Nginx的rewrite规则参考 ~ 为区分大小写匹配 ~* 为不区分大小写匹配 !和!
2019-04-10
  目录