简体   繁体   English

通过对等 VPC 访问 AWS 客户端 VPN 终端节点的奇怪行为

[英]Weird behavior on AWS Client VPN endpoint access through Peered VPC

I've got a main AWS account where I have a VPC(VPC-A) and a Client VPN Endpoint configured.我有一个主 AWS 账户,其中配置了 VPC(VPC-A) 和客户端 VPN 终端节点。

I have another account where I have a Dev environment and a VPC(VPC-B) configured over there.我有另一个帐户,我在那里配置了一个开发环境和一个 VPC(VPC-B)。

I have setup the VPC peering between VPC-A and VPC-B and it's working as intended.我已经在 VPC-A 和 VPC-B 之间设置了 VPC 对等互连,并且它按预期工作。 The VPC-A CIDR is 172.43.0.0/16 The VPC-B CIDR is 10.2.20.0/23 VPC-A CIDR 为 172.43.0.0/16 VPC-B CIDR 为 10.2.20.0/23

I've setup the VPN Client endpoint with two explicit subnets, one in availability zone A the other on F, they both use the same route table(route table has peering connection to VPC-B).我已经使用两个显式子网设置了 VPN 客户端端点,一个在可用区 A 中,另一个在 F 上,它们都使用相同的路由表(路由表与 VPC-B 具有对等连接)。 I have authorized the CIDR of VPC-B on the VPN as well.我也在VPN上授权了VPC-B的CIDR。 The VPN Client CIDR is 7.0.0.0/16 VPN 客户端 CIDR 为 7.0.0.0/16

When I connect to the VPN and I get an IP like 7.0.0.131, I can ping an instance I have on VPC-B just fine当我连接到 VPN 并获得像 7.0.0.131 这样的 IP 时,我可以 ping 我在 VPC-B 上的实例就好了

When I connect to the VPN and I get an IP like 7.0.1.162, I get timeouts, I can't reach the instance on VPC-B at all.当我连接到 VPN 并获得像 7.0.1.162 这样的 IP 时,我遇到超时,我根本无法访问 VPC-B 上的实例。

The instance on VPC-B lives on availability zone C. VPC-B 上的实例位于可用区 C 上。

What am I missing here, why is the connection working fine through ips like 7.0.0... but not working on Ips with 7.0.1...?我在这里缺少什么,为什么连接可以通过 7.0.0 之类的 ips 正常工作......但不能在 7.0.1...的 ips 上工作?

I found the issue with my implementation.我发现我的实施存在问题。

I mentioned that my VPN Client endpoint has two subnet associations.我提到我的 VPN 客户端端点有两个子网关联。 On the VPN endpoint under Route Table, I realized I had created the route for the first subnet on AZ-A but I forgot to create the Route for the 2nd subnet on AZ-F.在路由表下的 VPN 端点上,我意识到我已经为 AZ-A 上的第一个子网创建了路由,但我忘记了为 AZ-F 上的第二个子网创建路由。

Creating a Route for the VPC-B CIDR(10.2.20.0/23) for the 2nd subnet as well solved the issue为第二个子网的 VPC-B CIDR(10.2.20.0/23) 创建路由也解决了这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM