In the Description section enter Allow IPSec, SSH, and Ping for servers in public subnet.
VPC, select ASG VPN vpc
Configure Inbound rules
Select Add rule
Select Type: SSH and Source: My IP. My IP represents a public IPv4 address you are using.
Click Add rule to add a new rule.
Select Type: All ICMP IPv4 and Source: Anywhere. Allow ping from any IP address.
Click Add rule to add a new rule.
Select Type: Custom UDP , Port:400 and Source : Anywhere.
Click Add rule to add a new rule.
Select Type: Custom TCP , Port:500 and Source : Anywhere
Check Outbound rules and select Create security group
Complete creation of VPN Public - SG. So we have created a Security Group. Next, we will proceed to create an EC2 server that plays the Customer Gateway role.
Access to EC2
Select Instances
Select Launch instances
In the Launch instances interface
Name, enter Customer Gateway instance
Executing AMI Selection
Select Quick Start
Select Amazon Linux
Select AMI
Select Instance type and select Key pair: aws-keypair(keypair created with instances)