Help Center/ Virtual Private Network/ User Guide (Ankara Region)/ FAQs/ Popular Questions/ Does a VPN Allow for Communications Between Two VPCs?
Updated on 2024-11-29 GMT+08:00

Does a VPN Allow for Communications Between Two VPCs?

  • If the two VPCs are in the same region, use a VPC peering connection to connect them.
  • If the two VPCs are in different regions, use a VPN to connect them. The operations are as follows:
    1. Create a VPN gateway for each VPC, and create a VPN connection between the two VPN gateways.
    2. For the VPN connection, set the customer gateway to the EIP of the peer VPN gateway.
    3. For the VPN connection, set the customer subnet to the subnet of the peer VPC.
    4. Set the same pre-shared keys (PSKs) and algorithms for the two VPCs.