Tạo EC2 Instance
Triển khai EC2 Instance cho Customer Gateway
ℹ️ Tổng quan
- Trong phần này, chúng ta sẽ triển khai EC2 instance để làm Customer Gateway
- Instance sẽ được đặt trong public subnet của VPC ASG VPN
- Cần cấu hình security group phù hợp cho VPN và SSH access
Tạo Security Group
- Truy cập VPC Dashboard
- Chọn Security Groups
- Click Create security group

- Cấu hình Security Group
- Name: Nhập
VPN Public-SG
- Description: Nhập
Allow IPSec, SSH and Ping for servers in public subnet
- VPC: Chọn ASG VPN

🔒 Security Rules
Thêm các inbound rules sau:
- SSH (port 22) từ My IP
- ICMP IPv4 từ Anywhere
- Custom UDP port 400 từ Anywhere
- Custom TCP port 500 từ Anywhere

- Kiểm tra outbound rules và click Create security group

Triển khai EC2 Instance
- Truy cập EC2 Dashboard
- Chọn Instances
- Click Launch instances

- Cấu hình Instance
- Name: Nhập
Customer Gateway instance
- AMI: Chọn Amazon Linux 2023
- Instance type: t2.micro
- Key pair: Chọn
aws-keypair

- Network Settings
- VPC: Chọn ASG VPN
- Subnet: Chọn VPN Public
- Auto-assign public IP: Enable
- Security group: Chọn VPN Public-SG

⚠️ Lưu ý
- Đảm bảo instance có public IP để có thể thiết lập VPN tunnel
- Security group phải cho phép traffic VPN (UDP 400, TCP 500)
- Kiểm tra kỹ các security rules trước khi launch
- Review và Launch Instance
- Kiểm tra lại cấu hình
- Click Launch instance
