You can connect your AWS VPC to Cato using an IPsec tunnel or a virtual Socket (vSocket). This article describes how to deploy a (vSocket) on an EC2 instance.
The vSocket provides these advantages :
-
Bandwidth management control and QoS
-
Maximizes connectivity to PoPs in the Cato Cloud
-
Support for high availability configurations
For more information about vSocket and IPsec sites, see Selecting the Connection Type for a Site.
This article assumes that you already have a VPC in your AWS environment.
-
Contact Cato Support and open a ticket for the Amazon AMI Request. Make sure that you provide the AWS account ID and region for the vSocket
-
You must have admin permissions to the AWS dashboard and the Cato Management Application
-
Make sure the environment meets the requirements listed inĀ Cato Socket Connection Prerequisites
-
In the Cato Management Application, create a new site for the AWS vSocket.
-
In AWS, create the virtual network resources for the vSocket instance.
-
Launch the vSocket instance from the Cato AMI image that you received from Support.
-
Verify that the vSocket is connected to your account.
Create the AWS vSocket site in the Cato Management Application, and the serial number for the vSocket is generated. This serial number is used when you launch the EC2 instance.
The Local IP for the vSocket must be the same as the IP address for the LAN interface on the EC2 instance. The first three IP addresses of the subnet are reserved by the VPC.
After you create the site, the Cato Management Application automatically generates a unique serial number for the new vSocket. You need to enter this serial number when you launch the EC2 instance (see below Launching the Instance with the Cato AMI).
To create the site for the AWS vSocket:
-
In the Cato Management Application, from the navigation menu select Network > Sites.
-
Click New. The Add Site panel opens.
-
Configure the General settings for the site:
-
Enter the Site Name.
-
Select the Site Type. This option determines which icon is used for the site in the Topology window.
-
Select vSocket AWS for the Connection Type.
-
Configure the Configure the Country, State, and Time Zone to set the time frame for the Maintenance Window. Country, and State.
-
-
Configure the WAN Interface Settings, including the Downstream and Upstream bandwidth according to your ISP bandwidth.
-
Configure the LAN Interface Settings, including the Native Range for the AWS site. This setting must be the same as the LAN subnet IP range in AWS (see below Creating the MGMT, WAN, and LAN Subnets).
-
Click Apply. The site is added to the Sites list.
The Cato Management Application automatically generates a unique serial number for the new vSocket. You need to enter this serial number (S/N) is used during when you launch the EC2 instance (see below Launching the Instance with the Cato AMI).
Create these virtual resources for the vSocket instance:
-
Internet gateway
-
Three subnets - WAN, LAN, and MGMT
-
Security group(s) to manage inbound and outbound communication
-
Three interfaces (ENIs) - WAN, LAN, and MGMT
-
Two route tables - Internet and LAN
-
Two Elastic IPs (for WAN and MGMT interfaces)
Note
Note: You can automate the deployment of your virtual resources with an AWS CloudFormation template. See below Automating AWS Virtual Resources Deployment.
Use the AWS Virtual Private Cloud (VPC) dashboard to create a new Internet gateway and attach it to your VPC.
To create the new Internet gateway and attach it to the VPC:
-
From the VPC dashboard, in the navigation menu select Virtual Private Cloud > Internet Gateways.
-
Click Create internet gateway.
-
In Name tag, enter the name for the Internet gateway.
-
Click Create internet gateway. The VPC dashboard shows the details for the Internet gateway.
-
From the Actions drop-down menu, select Attach to VPC.
-
In the Attach to VPC window, in the Available VPCs section, select the VPC.
-
Click Attach internet gateway. The Internet gateway is attached to your VPC.
Create these subnets in the AWS and then they are automatically attached to the VPC:
-
MGMT subnet
-
WAN subnet
-
LAN subnet - this is the same as the Native Range for the site.
Make sure that all the subnets are in the same AWS Availability Zone.
To create the subnet for the AWS vSocket:
-
From the VPC dashboard, in the navigation menu select Virtual Private Cloud > Subnets.
-
Click Create subnet.
-
From the Create subnet window, in the VPC section, select the VPC ID.
-
Configure the settings for the subnet:
-
Enter the Subnet name.
-
Select the Availability Zone for the subnet.
-
Enter the IPv4 CIDR block for the subnet. For the LAN subnet - this is the same value as the Native Range for the site.
-
-
To add additional subnets, click Add new subnet and repeat the previous step 4.
-
Click Create subnet. AWS creates the subnets and attaches them to the VPC.
Make sure that the security groups rules for the LAN, WAN, and MGMT traffic, meet these requirements:
-
Outbound rules - allow the following ports for the WAN and MGMT subnet so the traffic can reach the Cato Cloud
-
HTTPS - TCP port 443 to destination ANY
-
DTLS - UDP port 443 to destination ANY
-
-
Inbound rules - in some troubleshooting scenarios, you may need to temporarily open ports TCP/22 and TCP/443 from a specific IP address to the MGMT subnet
Create the MGMT, WAN, and LAN interfaces for the vSocket for the EC2 instance. Use the EC2 dashboard to create the interfaces.
Set the Custom IP address for the LAN interface to the same IP address as the Local IP for the Native Range.
You need to disable AWS source/destination checking on the LAN interface to allow the EC2 instance to perform traffic forwarding.
Note
Note: To ensure proper vSocket behavior, make sure that you enable the DHCP options for the VPC are enabled and that they provide the DNS settings.
To create the network interface (ENI):
-
From the EC2 dashboard, in the navigation menu select Network & Security > Network Interfaces.
-
Click Create network interface.
-
In the Create network interface window, select the LAN Subnet.
-
(Optional for the LAN interface) In Private IPv4 address, click Custom and enter the Local IP for the Native Range.
-
In Security groups, select the appropriate security group for the interface.
-
Click Create network interface. AWS creates the interface.
-
Repeat the previous steps for the WAN and MGMT interface.
-
For the LAN interface, disable AWS source/destination tracking:
-
In the Network Interfaces window, right-click the LAN interface and select Change source/dest. check.
-
In the Change source/destination check window, clear Enable.
-
Click Save.
-
Create new or use existing VPC route tables for the vSocket traffic:
-
Private route table for the LAN subnets
-
Attach the LAN subnet
-
Define the Socket LAN ENI as the target (next hop) for the default route
-
-
A single Internet route table for the MGMT and WAN subnets. This route table is used to provide connectivity between the vSocket and the Cato Cloud resources.
-
Attach the WAN and MGMT subnets
-
Define the Internet Gateway as the target (next hop) for the default route
-
To create the Internet and LAN route tables:
-
From the VPC dashboard, in the navigation menu select Virtual Private Cloud > Route Tables.
-
Click Create route table.
-
In Name tag, enter the name for the Internet or LAN route table.
-
Select the VPC for the vSocket.
-
Click Create. The route table is added to the VPC.
-
Associate the WAN and MGMT subnets to the Internet route table, or the LAN subnet to the LAN route table.
-
Right-click the route table and select Edit subnet associations. This is an example of the Internet route table.
-
In the Edit subnet associations window:
-
For the Internet route table, select the MGMT and WAN subnets
-
For the LAN route table, select the LAN subnet
-
-
Click Save. The subnets are associated with the route table.
-
-
Add the default route to each route table (first configure the Internet route table and then the LAN).
-
Right-click the route table, and select Edit routes. The following screenshot shows the Internet route table:
-
Click Add route.
-
Set the Destination for the new route to 0.0.0.0/0.
-
In Target, select the next hop for the Internet or LAN route table:
-
For the Internet route table, select Internet Gateway and choose the Internet gateway for the VPC
-
For the LAN route table, select Network Interface and choose the LAN ENI. The following screenshot shows the LAN route table:
-
-
Click Save changes.
-
The window shows that the route was successfully created, click Close.
-
-
Repeat the previous steps for the LAN route table.
Create and associate Elastic IP addresses with the WAN and MGMT interfaces. You can use a public IP address that is allocated from Amazon's pool of IPv4 addresses.
To allocate an Elastic IP address:
-
From the EC2 dashboard, in the navigation menu select Network & Security > Elastic IPs.
-
Click Allocate Elastic IP address.
-
For the Public IPv4 address pool, select Amazon's pool of IPv4 addresses.
-
Click Allocate. The Elastic IP is allocated.
-
Select the Elastic IP, and select Actions > Associate Elastic IP address.
-
In the Associate Elastic IP address window, in Resource type, select Network interface.
-
In Network interface, select the WAN or MGMT interface.
-
Click Associate. The Elastic IP is associated with the interface.
-
Repeat the previous steps for the MGMT interface.
In AWS, you can use CloudFormation templates for a quick and easy deployment of your virtual resources for the vSocket.
An example template for use is available here. This template can be used for a vSocket deployment.
The following are prerequisites to run the template:
-
You must submit a ticket to Cato Networks' Product Support in order to obtain the EC2 AMI for the Virtual Socket.
-
You must have an existing keypair or create one before you can execute the CloudFormation Stack template.
-
You must have a "Serial Number" for the Virtual Socket which can be obtained after creating the Site in the Cato Management Application.
To use the example CloudFormation template:
-
Download the template yaml file attached to this article.
-
Open the AWS console.
-
Navigate to Services > CloudFormation.
-
Click Create Stack.
-
Choose Template is ready and upload the template file.
-
Give the Stack a name and enter the values for each of the virtual resources.
-
Click Next and Submit. The automated deployment will now run.
After you create all the virtual resources that are necessary for the vSocket, launch the EC2 instance from the Cato vSocket AMI to create the vSocket.
Launch the EC2 instance using the vSocket AMI that you received from Cato Support.
Note
Note: To add the vSocket AMI to your AWS account, contact Cato Support and open a ticket for the Amazon AMI Request.
Make sure that the EC2 instance meets these requirements:
-
4 vCPUs
-
8 GB RAM (8 GiB)
-
4 ENIs (network interfaces)
The following EC2 instance types are certified for vSockets:
-
c5.xlarge
-
c5n.xlarge (Suggested for higher performance sites with bandwidth above 2Gbps)
You need to enter the serial number (S/N) for the AWS site in the Cato Management Application to the AMI wizard.
To launch the EC2 instance:
-
From the EC2 dashboard, in the navigation menu select Instances > Instances.
-
Click Launch instances.
-
From the Step 1: Choose an Amazon Machine Image (AMI) window, select My AMIs.
-
In the Ownership filter, select Shared with me.
-
Find the VSOCKET-AWS-<version number> AMI, and click Select.
-
From the Step 2: Choose an Instance Type window, select the instance type and click Next: Configure Instance Details.
-
From the Step 3: Configure Instance Details window, configure these settings for the vSocket instance:
-
In Network, select the VPC.
-
In Subnet, select the MGMT subnet.
-
In the Network interfaces section, for eth0 select the MGMT ENI.
-
In the Advanced Details section, in User data enter the S/N for the AWS site.
In the example above, the S/N is: A1-B2-C3-D4-E5-F6.
-
Click Next: Add Storage.
-
-
From the Step 4: Add Storage window, configure these settings for the SSD:
-
Size (GiB) - 16
-
Volume Type - General Purpose SSD (gp2)
-
-
Click Next: Add Tags, and then click Next: Configure Security Group.
-
From the Step 6: Configure Security Group window, select the WAN security group.
-
In Assign a security group, choose Select an existing security group.
-
Select the appropriate security group for traffic to the MGMT interface. For example, you can choose the MGMT security group.
-
Click Review and Launch.
If you see a warning message regarding port 22, you can ignore this message. Port 22 is only needed to troubleshoot the vSocket.
-
-
From the Step 7: Review Instance Launch window, review the settings and click Launch.
-
In the Select an existing key pair or create a new key pair window, use an existing key or create and download a new one.
-
Click Launch Instances.
After the vSocket instance launches, the MGMT interface is attached to it. Stop the instance and then attach the remaining WAN and LAN interfaces to the instance.
Note
Note: Make sure that the EC2 instance is stopped and that first you attach the WAN interface first, and then the LAN interface.
To attach the interfaces to the vSocket instance:
-
From the EC2 dashboard, in the navigation menu select Instances > Instances.
-
Right-click the vSocket instance and select Stop instance.
-
In the confirmation window, click Stop. Refresh the window and confirm that the Instance state is Stopped.
-
In the navigation menu select Network & Security > Network Interfaces.
-
Attach the WAN and LAN interfaces to the instance:
-
Right-click the WAN interface, and select Attach interface.
-
In the Attach network interface window, in Instance select the vSocket instance.
-
Click Attach.
-
Repeat the previous three steps for the LAN interface.
-
After you attach the interfaces to the vSocket, start the instance and confirm that it connects to the Cato Cloud. After the vSocket connects to the Cato Cloud, it automatically updates to the newest Socket version.
If your application EC2 instances are associated to a non-Native Range subnet (a subnet which is not the vSocket LAN interface subnet), in the Cato Management Application add a routed range in the Networks section for the site.
To route traffic to the EC2 instance:
-
From the navigation menu, select Network > Sites, and select the site.
-
From the navigation menu, select Site Settings > Networks.
-
In the LAN section, click New. The New IP range panel opens.
-
Enter the Name for the IP range.
-
Set the Type of range to Routed.
-
Enter the Subnet IP Range.
-
Set the Gateway IP to the VPC router, which is the first host IP address of the Native Range subnet.
-
(Optional) Configure the Static NAT for the range.
-
Click Apply. The range is added to the Networks screen.
The screenshot above shows these sample settings for the Routed range:
-
Native Range - 10.0.2.0/24
-
Routed range - 10.0.26.0/24
-
Gateway IP - 10.0.2.1
Comments
0 comments
Please sign in to leave a comment.