Site2Cloud With Customized SNAT

This document demonstrates how to create a Site2Cloud connection between two VPCs by using a VGW and an Aviatrix gateway. The Aviatrix gateway also serves as a Source NAT device and translates source IPs of traffic initiated from a peering VPC to an IP address selected by users.

Environment Requirements

There are two VPCs as illustrated in the diagram below. The VPC-1 CIDR is and the VPC-2 CIDR is The Site2Cloud connection is between a VGW in VPC-1 and an Aviatrix gateway in VPC-2.


You will also configure customized SNAT at the Aviatrix gateway, which translates the source IP of traffic initiated from VPC-1 ( to a user selected IP address ( in this example). This way, VPC-2 VMs will see all packets from VPC-1 with the same source IP address (

Steps to Configure Site2Cloud Connection and SNAT

  1. Install an Aviatrix gateway in VPC-2. Download and install the Aviatrix Gateways by following these instructions.

  2. Follow the instructions in one of these documents to create an Unmapped external connection between a VGW in VPC-1 and an Aviatrix gateway in VPC-2.

    Select the Generic Remote Gateway Type when you complete one of the above procedures. Any other Remote Gateways listed here are only valid with Controller version 6.7 or lower.

    The Site2Cloud external connection feature enables connections from one site (or datacenter) to other sites (including cloud environments).

  1. Update VPC-1 Route Tables at AWS portal to ensure that traffic with VPC-2 ( as the destination takes the VGW as "Target":

    Field Value



    VGW ID

  2. Configure Customized SNAT at the Aviatrix gateway.

    1. In Aviatrix CoPilot, go to Cloud Fabric > Gateways > Spoke Gateways.

    2. Select the Aviatrix gateway created in VPC-2.

    3. On the Settings tab, expand the Network Address Translation (NAT) area.

    4. Turn On Source NAT.

    5. Select Customized SNAT.

    6. Configure the following SNAT rule.

    Field Value

    Source CIDR

    VPC-1 CIDR (

    Source Port

    Leave it blank

    Destination CIDR

    VPC-2 CIDR (

    Destination Port

    Leave it blank






    Leave it blank

    SNAT IPs

    User selected IP (

    SNAT Port

    Leave it blank

  1. Click Save.

  2. Slide Apply Route Entry On to commit the rule.

Test Site2Cloud Connection and SNAT

  • Go to Diagnostics > Cloud Routes > External Connections to verify that the external connection status is Up.

  • Ping from an Ubuntu VM in VPC-1 to another Ubuntu VM in VPC-2.

  • Turn on "tcpdump icmp -n" at the Ubuntu VM in VPC-2. Verify the source IP of the pings is