简体   繁体   English

如何通过网关传输将 Azure Web 应用与 VNet 集成

[英]How to integrate Azure Web App with a VNet with gateway transit

I have two VNets: A and B .我有两个 VNet: AB VNet B has a VPN gateway and connected to an on-premise network. VNet B有一个 VPN 网关并连接到本地网络。 VNet A is peered with VNet B with transit gateway enabled. VNet A与启用了中转网关的 VNet B对等互连。 This works perfectly for virtual machines.这对虚拟机非常有效。 I deploy VMs to VNet A and can access on-premise resources from there VMs.我将 VM 部署到 VNet A,并且可以从那里的 VM 访问本地资源。

Now I want to deploy a Web App and connect it to VNet A , so the web app will have access to on-premise resources.现在我想部署一个 Web 应用程序并将其连接到 VNet A ,以便该 Web 应用程序可以访问本地资源。 But to do so, I need to add a VPN gateway into the network A , which is impossible when the network is peered with another network with Use remote gateway option on.但是要做到这一点,我需要在网络A 中添加一个 VPN 网关,当网络与另一个网络对等时,使用远程网关选项是不可能的。 But I need this option to be on to have access to on-premise resources.但我需要启用此选项才能访问本地资源。

What should I do?我该怎么办? How I can give access from Web App to on-premise resources without using App Service Environment?如何在不使用应用服务环境的情况下从 Web App 访问本地资源? Is it possible?是否可以?

Basically, I need the combination of these two schemes基本上,我需要这两种方案的结合在此处输入图片说明 在此处输入图片说明

In this case, you should integrate with VNet B from the Azure web app.在这种情况下,你应该从 Azure Web 应用程序与 VNet B 集成。 Also, It will be integrated with a point-to-site VPN enabled VNet.此外,它将与启用点到站点 VPN 的 VNet 集成。 There is a new version of the VNet Integration feature that is in preview .有一个新版本的 VNet 集成功能正在预览中 It doesn't depend on point-to-site VPN.它不依赖于点到站点 VPN。 From your scenario, the web app is working like " VPN clients" in a P2S connection on the second picture.在您的场景中,Web 应用程序在第二张图片上的 P2S 连接中像“VPN 客户端”一样工作。

Here are some things to keep in mind before connecting your web app to a virtual network:在将您的 Web 应用程序连接到虚拟网络之前,请记住以下几点:

A target virtual network must have point-to-site VPN enabled with a route-based gateway before it can be connected to app.目标虚拟网络必须通过基于路由的网关启用点到站点 VPN,然后才能连接到应用程序。 The VNet must be in the same subscription as your App Service Plan(ASP). VNet 必须与你的应用服务计划 (ASP) 处于同一订阅中。 The apps that integrate with a VNet use the DNS that is specified for that VNet.与 VNet 集成的应用使用为该 VNet 指定的 DNS。

Ref: https://docs.microsoft.com/en-us/azure/app-service/web-sites-integrate-with-vnet参考: https : //docs.microsoft.com/en-us/azure/app-service/web-sites-integrate-with-vnet

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM