Azure Function connect to VPN using Vnet

Jorge Mitsujiro Okawa Chiu 0 Reputation points
2024-01-22T19:21:27.47+00:00

Hi im trying to connect a azure function to a server through a VPN using a Virtual subnet but i dont know which one do i have to configure inbound or outbound or both? i have tried the three approaches but neither one of them works

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,678 questions
Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,461 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,311 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ben Gimblett 3,845 Reputation points Microsoft Employee
    2024-01-26T12:36:21.27+00:00

    Hi Jorge - as per Mikes comment it would be good to get a little more info so we can help you

    Just based on what you wrote already

    "function to a server through a VPN using a virtual subnet" - If I assume the function is in Azure and the "virtual subnet" is an Az VNET subnet then you have a VPN gateway either on that VNET or a peered VNET which has a valid route to the server at the other end - then you would need "outbound" connectivity - that is the function needs to be connected using regional vnet integration https://learn.microsoft.com/en-us/azure/azure-functions/functions-networking-options?tabs=azure-cli#virtual-network-integration - Note: the gateway-required option would not be required in the scenario I'm describing.

    You should be able to test connectivity (or at least name look up and ping) via the kudu console
    REF
    https://techcommunity.microsoft.com/t5/apps-on-azure-blog/networking-related-commands-for-azure-app-services/ba-p/392410

    Remember that you may need name resolution at the Azure end and, again you'd need a valid route. REF
    https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview#gateways-and-on-premises-connectivity

    0 comments No comments