0

I have a container (linux .NET Core) running in Azure. This application reads from Azure Service Bus and writes information in a database on-premises.

The connection to ASB is working fine but when the application tries to connect to SQL Server, I get a timeout. Initially, I was running the container with no network setup (the 'None' option). Then I went to public and it now gives me an IP address.

My infrastructure team added this IP to our firewall but either Azure is trying to access it with a different IP address OR the connection never leaves the Docker environment.

ps.: I have an App Service running (.NET Core API) and it does connect to the same SQL Server (same IP address) correctly.

Suggestions?

Catinodeh
  • 301
  • 3
  • 16

1 Answers1

2

Since the IP address that outgoing from the Azure container group is random from Azure cloud IP list, you can not directly add its IP to the firewall. You can vote up this feature request for using the same exposed public IP for outbound traffic starting from the container group.

Currently, you could deploy container instances into an Azure virtual network, then the container could communicate with on-premises resources through a VPN gateway or ExpressRoute. For more details, you could see enable containers to use Azure Virtual Network capabilities.

enter image description here

Nancy
  • 26,865
  • 3
  • 18
  • 34