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

  1. Truy cập VPC Dashboard
    • Chọn Security Groups
    • Click Create security group

Create VPC

  1. 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

Create VPC

🔒 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

Create VPC

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

Create VPC

Triển khai EC2 Instance

  1. Truy cập EC2 Dashboard
    • Chọn Instances
    • Click Launch instances

Create VPC

  1. 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

Create VPC Create VPC Create VPC

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

Create VPC

⚠️ 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
  1. Review và Launch Instance
    • Kiểm tra lại cấu hình
    • Click Launch instance

Create VPC Create VPC