Connect Azure AppService web app to Azure Virtual Machine through private network. Possible?

Solution 1:

To allow your App Service to access your VM over it's private IP you need to enable Virtual Network (VNET) integration. This will allow your app to communicate directly with your DB over the private VNET. Fulls steps on how to set this up are here.

A few things to bear in mind:

  • This requires a standard or premium web app
  • Your VNET must have point-to-site VPN enabled with a Dynamic routing gateway, you may have to recreate your VNET to enable this.
  • The VNET and App Service must be in the same subscription