Openvpn – How to configure OpenVPN with Multiple VPCs in different region

amazon-vpcopenvpn

I have different VPCs in different regions in AWS:

  1. 10.1.0.0/16(A)
  2. 10.2.0.0/16(B)
  3. 10.3.0.0/16(C)

I followed this article(http://cloudacademy.com/blog/openvpn-aws-vpc/) to open a vpn connection in order to let server instances in B to communicate RDS instance in private subnet of VPC A.

I did the following in ipsec.conf:

rightsubnet=10.2.0.0/16

Everything works fine but how am I supposed to connect C to A? Do I need to open an another OpenVPN instance? I am pretty sure there is a way to accomplish this.

Best Answer

For VPC in the Same region:

VPC peering, Set up a VPC Peer connection to the other VPC's. So if the vpn server is in A, creating a VPC peer connection from A to B and A to C.

http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/Welcome.html

For VPC Peering in Different Regions:

You can Use a software VPN like Openvpn or Strongswan

Leverages AWS networking equipment in-region and Internet pipes between regions

Layer 3 setup with OpenVPN

Layer 2 setup with OpenVPN

https://docs.openvpn.net/how-to-tutorialsguides/administration/extending-vpn-connectivity-to-amazon-aws-vpc-using-aws-vpc-vpn-gateway-service/

https://s3.amazonaws.com/awsmedia/AWS_Amazon_VPC_Connectivity_Options.pdf