1
0
mirror of synced 2024-11-23 05:26:02 +03:00
setup-ipsec-vpn/aws/README.md

62 lines
3.0 KiB
Markdown
Raw Normal View History

2020-08-27 07:48:08 +03:00
# Deploy to Amazon EC2 using CloudFormation (Beta)
*Read this in other languages: [English](README.md), [简体中文](README-zh.md).*
2020-08-27 07:48:08 +03:00
> **Note:** This deployment template is still in **BETA**. You may encounter failures during deployment. In that case, please open a new issue.
2020-08-27 07:48:08 +03:00
This template will create a fully-working IPsec VPN server on Amazon Elastic Compute Cloud (Amazon EC2). Please make sure to check the EC2 [pricing details](https://aws.amazon.com/ec2/pricing/on-demand/) before continuing. Using a `t2.micro` server instance for your deployment may qualify for the [AWS Free Tier](https://aws.amazon.com/free/).
Available customization parameters:
2020-08-27 07:48:08 +03:00
- Amazon EC2 instance type
- OS for your VPN server (Ubuntu 20.04/18.04/16.04, Debian 9)
> **Note:** Before using the Debian 9 image on EC2, you need to first subscribe at the AWS Marketplace: [Debian 9](https://aws.amazon.com/marketplace/pp/B073HW9SP3).
- Your VPN username
- Your VPN password
2020-08-27 09:16:34 +03:00
- Your VPN IPsec PSK (pre-shared key)
> **Note:** DO NOT use these special characters within values: `\ " '`
Make sure to deploy this template with an **AWS Account Root User** or an **IAM Account** with **Administrator Access**.
2020-08-27 07:48:08 +03:00
Right-click this [**template link**](https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/aws/cloudformation-template-ipsec) and save as a file on your computer. Then upload it as the template source in the stack creation wizard.
2020-08-27 07:48:08 +03:00
![Upload the template](upload-the-template.png)
At step 4, make sure to confirm that this template may create IAM resources.
![Confirm IAM](confirm-iam.png)
2020-08-27 07:48:08 +03:00
Click the icon below to start:
2020-08-27 09:16:34 +03:00
<a href="https://console.aws.amazon.com/cloudformation/home#/stacks/new" target="_blank"><img src="cloudformation-launch-stack-button.png" alt="Launch stack" height="34px"></a>
You may choose an AWS region using the selector to the right of your account information on the navigation bar. As soon as the stack's status turns **"CREATE_COMPLETE"**, you are ready to connect to the VPN server. Click the **Outputs** tab to view your VPN login details. Then continue to [Next steps: Configure VPN Clients](../README.md#next-steps).
2020-08-27 07:48:08 +03:00
## FAQs
<details>
<summary>
2020-08-27 07:48:08 +03:00
How to connect to the server via SSH after deployment?
</summary>
Amazon EC2 does not allow users to access newly created instances with an SSH password. Instead, users are required to create "key pairs", which are used as credentials for SSH access.
2020-08-27 09:16:34 +03:00
This template generates a key pair for you during deployment, and the private key will be available as text under the **Outputs** tab after the stack is successfully created.
2020-08-27 09:16:34 +03:00
You will need to save the private key from the **Outputs** tab to a file on your computer, if you want to access the VPN server via SSH.
2020-08-28 07:47:46 +03:00
> **Note:** You may need to format the private key by replacing all spaces with newlines, before saving to a file.
2020-08-27 07:48:08 +03:00
![Show key](show-key.png)
</details>
## Author
Copyright (C) 2020 [S. X. Liang](https://github.com/scottpedia)
## Screenshots
2020-08-27 07:48:08 +03:00
![Specify parameters](specify-parameters.png)