Search code examples
azureazure-load-balancerazure-vpn

Azure load balancer inside a subnet VPN gateway


I have two virtual machines in azure VNet (IP adresses 10.1.0.4 and 10.1.0.5), and one machine connected to VNet via VPN Gateway (IP 10.3.0.2). Is is possible to create a load balancing in internal load balancer to redirect UPD traffic to VPN connected machine?


Solution

  • Azure Load Balancer supports virtual machines or virtual machine scale sets as it's backend pool endpoints along with addition of instances via network interface or IP addresses. However, a backend pool configured by IP address has the following limitation:

    • The backend resources must be in the same virtual network as the load balancer.

    Reference : https://learn.microsoft.com/en-us/azure/load-balancer/backend-pool-management#limitations

    So, you cannot add a VPN connected on-premise machine in the backend pool of the load balancer. There is an active feature request for this and it is under review by the load balancer product group team. You can upvote this feature request in the below forum for future improvements: https://feedback.azure.com/d365community/idea/49c222f6-8726-ec11-b6e6-000d3a4f0789