connect container instance to on-premises network

Anonymous
2022-01-17T07:38:43.54+00:00

I try to connect a container instance to a database which only have private IP like 172.168.x.x in our on-premises network, based on these two articles:

  1. https://godatadriven.com/blog/azure-container-instance-example/
  2. https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal

so i successfully create some container instance and application gateway and assigned them into different subnet, and i successfully create a vpn and the status of connection shows connected:
165605-6.png
165615-4.png
165584-3.png

VPN config:
165585-2.png
165593-7.png
165594-8.png
after finish those set up, i tried use container instance to connect to our on-prem database private IP but shows timeout, i went to a container instance to ping both VPN public IP, local network gateway IP, and databse private IP, all time out, but i can ping any other service private IP cross different subnets.
any ideas?
cheers

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
757 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,787 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,762 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SaiKishor-MSFT 17,336 Reputation points
    2022-01-25T01:56:21.473+00:00

    @Anonymous Thank you for reaching out to Microsoft Q&A. I understand that you are having issues with your VPN connection where you are unable to connect to the on-prem DB from your Azure based container service.

    Looking at the snapshots that you have shared, I see the VPN status is Connected and I see outbound data i.e., 3.9KiB but no data coming in. Please make sure to check the on-premise VPN device/Firewall to make sure that it is allowing the traffic inbound from Azure. Also, If you have more than one subnet on your on-premises advertised to Azure, make sure to enable the option "UsePolicyBasedSelectors" to True on the connection.

    Here are some things you can check in the meanwhile:

    1. Capture the traffic on the on-premise side while trying to connect and determine the flow of traffic. If possible, please share the same here.
    2. Confirm if you are able to connect from the on-premise side to the Azure Cloud direction.
    3. What stats do you see on the on-premise device for the VPN ingress/egress?

    Please do share the requested details so we can further investigate. Thank you and we apologize for the delay in responding to your question.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.