我在 azure DNS 服务上有一些 dns。全部都是公共(public) DNS。我能够从我的系统中解决它们。但这些域无法从我在 Azure 中创建的 VM 解析。 VM有公共(public)IP,Vnet有服务器
10.0.0.4
10.0.0.5
8.8.8.8
8.8.4.4
我不确定为什么这些域是从虚拟机解析的。如果我在配置中遗漏了某些内容,请告诉我。
[root@Server ~]# traceroute godqualified.com.dev.spointe.org
godqualified.com.dev.spointe.org: Name or service not known
[root@Server ~]# ping godqualified.com.dev.spointe.org
ping: godqualified.com.dev.spointe.org: Name or service not known
如果我 ping google.com,它工作正常。
[root@Server ~]# ping google.com
PING google.com (142.250.179.142) 56(84) bytes of data.
64 bytes from ams17s10-in-f14.1e100.net (142.250.179.142): icmp_seq=1 ttl=53 time=2.34 ms
64 bytes from ams17s10-in-f14.1e100.net (142.250.179.142): icmp_seq=2 ttl=53 time=2.38 ms
64 bytes from ams17s10-in-f14.1e100.net (142.250.179.142): icmp_seq=3 ttl=53 time=2.64 ms
64 bytes from ams17s10-in-f14.1e100.net (142.250.179.142): icmp_seq=4 ttl=53 time=2.51 ms
最佳答案
• 您无法从具有公共(public) IP 地址的 Azure VM 解析域 'godqualified.com.dev.spointe.org',因为 DNS 请求需要解析这些没有被转发到正确的 DNS 服务器/解析器。因为, you have public DNS servers in Azure, i.e., you might have created your public DNS zone in Azure for name resolution and DNS record management, I would suggest you ensure that your public DNS servers are configured in the DNS zone provisioned and since your VM has a public IP address, ensure that its DNS records are managed and registered by the DNS zone itself
。
• 另外,由于您的 VM 具有公共(public) IP 地址,我建议您将虚拟网络中的 DNS 服务器替换为在 Azure DNS 区域中注册的服务器。您可以在 NIC configuration of the VM also but please be aware that if some configuration is changed and then VM becomes unreachable, then it cannot be reconnected again, thus ensure to take a snapshot of the VM before doing any changes to the NIC configuration
中执行此操作.
曾经,virtual network’s DNS servers are replaced with the ones as said above, then any domain can be resolved from within the VM as the DNS requests will be forwarded to the public DNS servers in the Azure DNS zone
从那时起, VM is already registered in the Azure DNS zone, it will also use the Azure DNS for resolving DNS requests over the internet
。通过这种方式,您可以从 Azure VM 解析任何公共(public)域。
有关配置从 DNS 服务器到 Azure 提供的默认 DNS 的条件转发的更多信息,请参阅以下文档链接:-
关于azure - 无法解析 Azure DNS 上托管的域名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73068879/