使用对等网络上的 DNS 服务器,VPN 进入 Azure 网络时 DNS 失败

DNS Fails on VPN into Azure Network with DNS server on Peered network

我在 Azure 中有以下设置:

资源组 1

资源组 2

当我创建从家用笔记本电脑到虚拟网络网关的 VPN 连接时,我可以:

我不明白为什么我无法 ping 我的计算机名或 FQDN。

如果我执行 NSLookUp,我会得到

C:\Users\MyUser>nslookup
DNS request timed out.
timeout was 2 seconds.
Default Server:  UnKnown
Address:  192.167.64.4

192.167.64.4 是 DNS 服务器的正确内部 IP

如果我尝试 Ping 192.167.64.4,我得到:

C:\Users\MyUser>ping 192.167.64.4

Pinging 192.167.64.4 with 32 bytes of data:
Reply from 193.204.206.100: TTL expired in transit.
Reply from 193.204.206.100: TTL expired in transit.
Reply from 193.204.206.100: TTL expired in transit.
Reply from 193.204.206.100: TTL expired in transit.

Ping statistics for 192.167.64.4:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

有没有人能帮助我理解这个问题以及如何解决它?

根据您的描述,您的家用笔记本电脑通过 P2S VPN 连接到 Vnet2,您想使用笔记本电脑来 ping My1stVM,对吗?

不能通过 VPN 进行通信,因为没有派生的传递关系跨 VPN。

可以通过P2S VPNping通Vnet2,vm2可以通过vnet peeringping通vm1,但是不能ping通vm1。

I don't understand why I cannot ping my computername or FQDN.

因为您无法访问DNS 服务器。 DNS 不适合您。

您可以使用 gateway transit 来支持您的方案。

  1. 在 "Peering from vNet1 to vNet2" 上启用选项 "Use remote gateways"
  2. 在 "Peering from vNet2 to vNet1" 上启用选项 "Allow gateway transit"

来源:Configure VPN gateway transit for virtual network peering