I have experience setting up IPSec VPN connections from AWS to an on-prem firewall, but haven’t had to create an AWS to AWS IPsec VPN connection between customers before. Am I correct that one side will need to do the initial setup with placeholder customer gateway etc. and then after the VPN is created provide one of the outside IP addresses from that config to the other customer so they can create their config, then after their config is created take one of their tunnel outside IP address, and for the first customer create a new customer gateway and attach it to their config, also adjusting the customer gateway CIDR range, BGP ASN, and pre-shared key to match?
You should just use a Transit Gateway or Transit Gateway Peering if you need it across region. The connection happens on the WAS backbone and is encrypted and much faster than what a Site-to-Site would ever do. You’ll need different CIDRs to make it work as you setup the routing on each side. You can also attach the AWS Firewall to the TGW and inspect packets before you move them from account to account if that needs to happen.
The answer to your question is yes, although it depends what you mean by match, as I believe you’ll want different asns. Transit gateway or vpc peering is better.
I have control over one side, not the other, and the proposal to use S2S came from the other side. Since this won’t scale beyond the two VPCs, I’ll ask about VPC Peering.
your method is correct.
you can definitely configure two AWS S2S VPNs at each other and bring 1 tunnel up
some things to be aware of
only works for static type routing) because with BGP, AWS will want the lower of the two IPs in the 169.254 range. since it is AWS at both ends it is not compatible so BGP won’t work)
only 1 tunnel can be up. because of the limitation of 1 IP for a CGW resource. so for redundancy, repeat the process with 2 more VPNs.
use IKEv2, and one side must have startup action set to start. to initiate IPsec to the peer. both can be set to start, it won’t matter
the same PSK must be configured at both ends, of course.
leave local and remote CIDRs to 0.0.0.0/0 for simplicity.
all other parameters must be the same on both ends of course
you can use the Virtual Private Gateway for the VPC since it is free. set static routes in the VPNs themselves, and enable VGW propagation on the relative subnet route tables.
so that’s the how.
it’s definitely not the ideal way to connect two VPCs, but if is there some odd requirement such as IPsec between networks or orgs, this will accomplish that
I agree from an architectural standpoint (thinking about packet paths) that all those make more sense. I am wondering if there is a reason that an IPSec S2S VPN can’t work, or is it simply something that has just gone untested? I haven’t been able to find anyone documenting the use of it for VPC to VPC communication, but I also haven’t found anything saying it can’t be used in that capacity.
Thanks, I was wondering about BGP, good to know that won’t work. I also noticed there was no place to use two CGW resources, and inferred that redundancy in one VPN configuration wasn’t going to be possible, appreciate the confirmation there. Thanks for the info on IKEv2 and static routes. I will see if VPC peering is a permitted option for all parties, and if not, fall back to AWS S2S.
I have 10+ years experience with AWS but I didn’t hear a single requirement about suing S2S VPN to connect 2 VPCs and as I remembered correctly AWS don’t have any documents for that requirement so maybe it is not even possible if using only AWS managed services. But I’m 100 sure you can spin up 2 EC2 instances (each at 1 VPC) then connected that 2 instances using VPN, then route the traffic between VPC to those instances. But this is will not scale, provide single point of failure, additional cost…so again just use VPC peering is my recommendation (or use Transit Gateway but it is not free).
Ask another company who “asked” you that weird requirement WHY they even want to use the thing against AWS architect…
The only potentially legitimate reason I could think to do S2S VPN here would be if the VPCs are in different partitions, such as one in GovCloud and the other in commercial. Otherwise it seems like an overly convoluted solution for a problem that already has better and simpler solutions.
If this is between two (independent) customers then I recommend you do NOT put any form of layer-3/4 routing in between their networks. No AWS-managed site-to-site VPN, no self-hosted site-to-site VPN, no TGW, no VPC peering, nothing.
The reason is that if you have independent customers, then each of these customers manages its own IP plan, and sooner or later these plans are going to come into conflict with each other. Then you need to add band-aids like two-way NAT or other types of translation. That’s a rabbit hole you really don’t want to get close to.
And even if you don’t get into overlapping IP space problems, there’s still security to consider: You are essentially opening up their network to everyone who is connected to a different company. Sure, you can then try to lock things down with firewalls and whatnot, but it’s better not to start out with that gaping security hole in the first place.
If you are trying to connect independent customers together, then either implement things as if it comes from the public internet: DMZs, Reverse Proxies, API Gateways, Bastion Hosts and other tried and tested technology, which minimises and formalises the “interface”. Or interface your customers directly at layer-7. AWS has tools like PrivateLink and VPC Lattice for that.
This is a good point, and to clarify this is a situation where the “customer” is the same but they control one AWS environment directly while the other AWS environment is managed for them by a software vendor with almost all controls locked away so that they have to go through vendor support. So in this instance a site-to-site or peering arrangement would just bring together all of the customer’s data.