Reputation: 1332
I am running Ubuntu 18.04 in Container instances in Private Virtual Network. The container does not have access to the internet. How to enable access to specific URL on the internet?
Upvotes: 0
Views: 1753
Reputation: 4612
Yes romanzdk, You are in right direction, Seems some corporate firewall rules do not allow connection to the outside world.
By default, Azure Firewall denies (blocks) inbound and outbound traffic.
You can Define a use-defined route on the ACI subnet, to divert traffic to the Azure firewall.set the next hop type to VirtualAppliance, and pass the firewall's private IP address as the next hop address.
az network route-table route create \
--resource-group $RESOURCE_GROUP_NAME \
--name DG-Route \
--route-table-name Firewall-rt-table \
--address-prefix 0.0.0.0/0 \
--next-hop-type VirtualAppliance \
--next-hop-ip-address $FW_PRIVATE_IP
FW_PRIVATE_IP="$(az network firewall ip-config list \
--resource-group $RESOURCE_GROUP_NAME \
--firewall-name myFirewall \
--query "[].privateIpAddress" --output tsv)"
Also you can create a NAT rule on the firewall to translate and filter inbound internet traffic to the application container.
For more information how to outbound and inbound traffic to a container group by overcoming firewall refer this Microsoft Document
Upvotes: 1