简体   繁体   English

使用 VPC 对等互连连接 VPN 客户端

[英]Connecting VPN clients with VPC peering in between

Situation情况

  • I have a VPN Server running on VPC-A.我有一个在 VPC-A 上运行的 VPN 服务器。 IP 10.10.39.198 IP 10.10.39.198
  • I have multiple VPN Clients connected on VPN Server.我在 VPN 服务器上连接了多个 VPN 客户端。 All clients have IPs in the 172.16.0.0/15 range所有客户端的 IP 都在 172.16.0.0/15 范围内
  • I have an APP Server running on VPC-B.我有一个在 VPC-B 上运行的 APP 服务器。

I now need to communicate between the App Server and a VPN client.我现在需要在应用服务器和 VPN 客户端之间进行通信。

What have I done我做了什么

  • Setup VPC Peering connection between VPC-A and VPC-B在 VPC-A 和 VPC-B 之间设置 VPC 对等连接
  • Setup routing tables between VPC-A and VPC-B.在 VPC-A 和 VPC-B 之间设置路由表。 VPC-B is configured to route 172.16.0.0/15 to VPC-A VPC-B 配置为将 172.16.0.0/15 路由到 VPC-A

What works什么有效

  • VPN Server can ping the VPN clients VPN Server 可以 ping 通 VPN 客户端
  • App Server can ping the VPN Server. App Server 可以 ping 通 VPN Server。

And there is where I am stranded now.这就是我现在被困的地方。 The App server can't reach the clients of the VPN Server.应用服务器无法访问 VPN 服务器的客户端。

Traceroute stays dark (only starts). Traceroute 保持黑暗(仅启动)。 While a traceroute to the VPN server is ok.虽然到 VPN 服务器的跟踪路由没问题。 What exactly am I missing here?我到底错过了什么?

The problem you have here is transitive routing.您在这里遇到的问题是传递路由。 When trying to go from the app in VPC B to the clients, you're transiting VPC A. By default, this won't work.当尝试从 VPC B 中的应用程序转到客户端时,您正在传输 VPC A。默认情况下,这不起作用。

What you can do is set up a transit gateway and configure the routing appropriately from there.您可以做的是设置一个中转网关并从那里适当地配置路由。 VPC A would be your transit hub, and VPC B would be a spoke. VPC A 将是您的中转枢纽,而 VPC B 将是一个辐条。

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

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