Jakub Złoczewski
Jakub Złoczewski

Reputation: 451

Determine IP address/es of Azure Container Instances

Is there way to determine outbound IPs specific to Azure Container Instances?

Background: I would like to allow my container instance to send network messages to service behind firewall. To configure this firewall I need to know outbound IP address or range of IPs.

I found list of IPs for my region here https://www.microsoft.com/en-us/download/details.aspx?id=56519 but it's for all services (for my region it's more than 180 entries) not only container instances.

Upvotes: 4

Views: 8573

Answers (4)

Ovidiu Nistor
Ovidiu Nistor

Reputation: 1423

One can get the outboundIpAddresses from the Resource JSON for the Container APP. In Azure Portal go to the container's Overview -> Essentials -> JSON View button. enter image description here

Upvotes: 0

Baldy
Baldy

Reputation: 3669

The only way i have found to obtain the IP address of a container instance in Azure is to run the following command from within the container via the Azure Portal (settings -> containers -> connect)...

curl 'https://api.ipify.org?format=json'

Upvotes: 3

younes nedjar
younes nedjar

Reputation: 190

You can have container infos by executing this "Azure CLI" command

az container show --resource-group "RgName" --name "containerName" --output table

Upvotes: 0

rahulmar
rahulmar

Reputation: 66

You may be able to use Private IP, VNet deployment feature (in preview currently) of ACI to support this. https://learn.microsoft.com/en-us/azure/container-instances/container-instances-vnet

You can use the CIDR range of the subnet to configure your firewall.

HTH

Upvotes: 0

Related Questions