Routing/forwarding to onprem site

0

Hi,

Here my setup:

  • one on prem site (range 10.1.0.0/16)
  • one AWS Org with two account A & B, with a VPC peering between VPC-A (10.50.0.0/16) and VPC-B (10.20.0.0/16)
  • Wireguard VPN setup between vm1 (on prem) and vmA-1 (VPC-A)
  • VPC-A route: - 10.1.0.0/16 -> vmA-1 - 10.20.0.0/16 -> peering - 10.50.0.0/16 -> local - 0.0.0.0/0 -> igw
  • VPC-B route: - 10.0.0.0/8 -> peering - 10.20.0.0/16 -> local - 0.0.0.0/0 -> igw
  • IP src/dest check is disable on vmA-1

From an ec2 on any subnet in VPC-A, I can reach vms on prem. From an vm on prem, I can reach ec2s in VPC-A and VPC-B. From ec2 on any subnet in VPC-B, I can reach vmA-1. From ec2 on any subnet in VPC-B, I cannot reach vms on prem.

Did I miss something (obviously yes) ? Is there any src/dest check that need to be disable as well at the peering, route table level ?

Thanks for sharing your ideas !

ed
已提問 1 年前檢視次數 263 次
1 個回答
1

This setup will not work, you can only target the VPCA CIDR over the VPC peering connection. You would need to NAT the traffic on vmA-1 to make this work the way you have it setup now. Using a TGW in place of the VPC peer will allow you to route the traffic the way you are trying to over the VPC peer as TGWs provide transitive routing and the TGW attachment subnets in the VPCA can redirect the 10.1.0.0/16 traffic to vmA-1. You could also setup the VPN to the Transit Gateway directly or from the on-prem vm1 to VGWs on both VPCs or to EC2 instances in both VPCs.

AWS
專家
已回答 1 年前
  • Thanks a lot for confirming that something was wrong in my setup ! I'll give a try to the TGW and review my peering setup.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南