Azure SQL连接通过虚拟网络网关

huangapple go评论46阅读模式
英文:

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 Azure SQL连接通过虚拟网络网关

英文:

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 Azure SQL连接通过虚拟网络网关

答案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.

huangapple
  • 本文由 发表于 2023年4月11日 08:19:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/75981599.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定