英文:
Azure SQL connection via Virtual Network Gateway
问题
I've got working the ability to connect from my laptop using SQL Server Management Studio to managed Azure SQL sitting in a vnet, using virtual network gateway... BUT! I needed to add a hosts file record like below
10.0.1.4 myazuredb.database.windows.net
I'm using a private endpoint... which has an associated private DNS zone privatelink.database.windows.net
.
I can see the A record in there pointing to 10.0.1.4 for myazuredb.
Is the hosts file record needed? As the private DNS zone is concerned with privatelink.database.windows.net
as opposed to database.windows.net
?
Ultimately is it expected that I need to have the local hosts file record to resolve 10.0.1.4 or should it just work without it and I've configured something wrong?
Thanks for any help
英文:
I've got working the ability to connect from my laptop using SQL Server Management Studio to managed Azure SQL sitting in a vnet, using virtual network gateway... BUT! I needed to add a hosts file record like below
10.0.1.4 myazuredb.database.windows.net
I'm using a private endpoint... which has an associated private DNS zone privatelink.database.windows.net
.
I can see the A record in there pointing to 10.0.1.4 for myazuredb.
Is the hosts file record needed? As the private DNS zone is concerned with privatelink.database.windows.net
as opposed to database.windows.net
?
Ultimately is it expected that I need to have the local hosts file record to resolve 10.0.1.4 or should it just work without it and I've configured something wrong?
Thanks for any help
答案1
得分: 1
是的,在你当前的配置中,你需要 hosts 文件。如果你自己搭建 DNS 服务器或使用 Azure 私有解析器,你可以避免客户端需要配置 hosts 文件,以便 VPN 客户端可以解析服务。查看 Azure Private Resolver 的文档。
英文:
Yes, you need the hosts file in your current configuration. You can avoid having clients need to configure the hosts file if you roll your own DNS server or use Azure Private Resolver so that VPN clients can resolve the service. Take a look at the documentation for Azure Private Resolver.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论