大网数据广告活动
服务器运维问答

AWS VPC VPN blocked by AWS VPC connection peering

· 52CE 我爱测

We have set up AWS VPC in 2 regions as illustrated above. The VPN connection now works between two instances each directly connected to the VPCs at each end of the VPN setup (that is, VPC PROD in eu-west1 and VPC PROD in ap-south…

问题原文

原帖链接 · Magge · CC BY-SA 3.0

We have set up AWS VPC in 2 regions as illustrated above. The VPN connection now works between two instances each directly connected to the VPCs at each end of the VPN setup (that is, VPC PROD in eu-west1 and VPC PROD in ap-south1). So "Remote service" can communicate with "Prod service". This is illustrated by the green dotted line.

Since there is a peering connection between the 2 eu-west1 VPCs, I had hoped that VPC PROD in ap-south1 would be able to communicate with VPC ADMIN in eu-west1. This does not seem to be the case. That is, "Remote service" can not communicate with "Admin service". Illustrated by the red dotted line.

VPC ADMIN has routing table entries:

10.100.0.0/16 ==> peering connection to VPC PROD (eu-west1)

VPC PROD (eu-west1) has routing table entries:

10.100.0.0/16 ==> Virtual Private Gateway (VPG) / VPN connection

Also, VPC PROD (ap-south1) has routing table entries:

172.20.0.0/16 and 172.30.0.0/16 ==> strongswan instance.

I imagine the problem could be that traffic from ap-south1 arrives in eu-west1s VPG router and has a hard demand it can reach it's endpoint in the VPGs associated VPC, and it won't look at the VPCs routing table and thus it won't support using the matching routing table entry to send the traffic to the peering connection to VPC ADMIN. Can someone confirm whether or not that is supposed to work?

At the moment the only way to get this going seems to create a second VPN connection which would have a VPG associated with VPC ADMIN. Then adjust routing in ap-south1 to hit the old VPN for 172.20.0.0/16 (VPC PROD) and the new VPN for 172.30.0.0/16 (VPC ADMIN). This should work, but will cost twice as much and means more configuration to maintain...

Other ideas to make it work?

已采纳解答

原帖链接 · Michael - sqlbot · CC BY-SA 3.0

This does not work, by design.

Edge to Edge Routing Through a Gateway or Private Connection

If either VPC in a peering relationship has one of the following connections, you cannot extend the peering relationship to that connection:

  • A VPN connection

...

http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/invalid-peering-configurations.html

VPC peering only allows access from instance to instance across the VPC boundary. It doesn't allow access to any kind of "gateway," like an Internet Gateway, NAT Gateway, VPC Service Endpoint, AWS Direct Connect, or Hardware VPN.

Traffic crossing a peering connection can't "transit" the VPC and get out the other side.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-01-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。