Azure 虚拟网络网关 - 访问其他资源组中的资源

Azure Virtual Network Gateway - Access resources in other resource groups

让我们假设以下场景:

这两个 VM 都只能通过私有 IP 地址访问。通过 Public IP 地址的 RDP 不是一个选项。人们会假设,为了让我通过 RDP 连接到这些机器,我必须先通过 VPN 连接到 Azure 的网关。但是,我不想在每个资源组中都创建一个虚拟网关。

我可以通过 vpn 连接到一个资源(在一个资源组中),并访问所有其他资源组中的所有机器吗?

您可以在启用 Use remote gateways 复选框的情况下使用 vnet 对等互连。您需要将 vnet 放在一起并在第二个 vnet(没有网关的 vnet)上检查 use remote gateways

阅读中:
https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/hub-spoke
https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview

是的,可以通过 VNet 对等互连(连接 同一 Azure 区域 内的 VNet)来实现。您可以按照此操作 implement a hub-spoke network topology in Azure. 在这种情况下,中心 VNet 是一个启用了 允许网关传输 的对等 VNet,而辐射 VNet 是一个 的对等 VNet使用远程网关 启用。

请注意,您不能使用远程网关或允许网关通过全球对等互连(跨 Azure 区域连接 VNet)进行传输。请参阅 requirements and constraints 关于全球对等互连。

To use remote gateways or allow gateway transit, peered virtual networks in must be in the same region.

因此,如果每个资源组中的两个 VNet 不在同一区域,则必须将对等 VNet 移动到同一区域。

另一个选项将在另一个资源组中创建一个单独的 VPN 网关,但这不是您的期望。请注意

A Point-to-Site client can only connect to resources in the VNet in which the virtual network gateway resides.

参考 VPN 网关 FAQ