Site-to-site VPN
Securely connect your VPC to your own data centre, office or another VPC over a site-to-site VPN tunnel.
A site-to-site VPN connection joins whole networks together over a secure tunnel -- your VPC and your own data centre, for example, or two VPCs in different availability zones. Unlike an ordinary client VPN it requires no VPN software on the individual servers; all traffic goes through the VPC's own virtual router.
Three things are needed, in order: a customer gateway (the far end in your own data centre), a VPN gateway on the VPC itself, and finally a connection between the two.
Create a VPN customer gateway
- Select Network in the left-hand navigation and choose VPN Customer Gateway.
- Click Add VPN Customer Gateway and specify:
- Name: unique to this gateway.
- Gateway: the IP address of the external gateway.
- CIDR list: the external network's address range -- it must not overlap the VPC's own.
- IPsec Preshared Key: the shared key the two gateways use to authenticate each other.
- IKE encryption/hash/version/DH, ESP encryption/hash, Perfect Forward Secrecy: the cryptographic parameters for the connection's two phases. These must match what the external gateway is configured with.
- IKE/ESP Lifetime: how often the keys are renegotiated.
- Dead Peer Detection: enable this if you want the router to keep checking whether the far end is still responding.
- Click OK.
A VPN customer gateway can only be attached to one VPN connection at a time.
Edit or remove a VPN customer gateway
A customer gateway can only be edited if it either has no connection, or the connection is in an error state.
- Select VPN Customer Gateway and choose the gateway you want to work with.
- Click Edit VPN Customer Gateway to change it, or Delete VPN Customer Gateway to remove it.
Create a VPN gateway for your VPC
- Open your VPC and click Configure.
- Select Site-to-Site VPN. The first time, you are asked to create a VPN gateway -- confirm with Yes.
After a moment the gateway is created, with its own public IP address.
Create a VPN connection
There can be up to 8 VPN connections at a time.
- Open your VPC and select Site-to-Site VPN under the settings.
- Make sure VPN Connection is selected in the view, and click Create VPN Connection.
- Choose the customer gateway the connection should use.
- Select Passive if the connection is between two of your own VPCs and this side should wait for the other side to establish it -- enable Passive on one side only, never both.
- Click OK.
The connection first shows as Disconnected; wait around 30 seconds and it changes to Connected on both sides.
Restart or remove a VPN connection
- Open your VPC, select Site-to-Site VPN, and make sure VPN Connection is selected in the view.
- Select the connection you want to work with.
- Click Delete VPN connection to remove it, or Reset VPN connection to restart it.