You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-apps/firewall-integration.md
+50-32Lines changed: 50 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,57 +16,75 @@ Network Security Groups (NSGs) needed to configure virtual networks closely rese
16
16
17
17
You can lock down a network via NSGs with more restrictive rules than the default NSG rules to control all inbound and outbound traffic for the Container Apps environment at the subscription level.
18
18
19
-
In the workload profiles environment, user-defined routes (UDRs) and securing outbound traffic with a firewall are supported. When using an external workload profiles environment, inbound traffic to Container Apps that use external ingress routes through the public IP that exists in the [managed resource group](./networking.md#workload-profiles-environment-1) rather than through your subnet. This means that locking down inbound traffic via NSG or Firewall on an external workload profiles environment is not supported. For more information, see [Networking in Azure Container Apps environments](./networking.md#user-defined-routes-udr).
19
+
In the workload profiles environment, user-defined routes (UDRs) and [securing outbound traffic with a firewall](./networking.md#configuring-udr-with-azure-firewall) are supported. When using an external workload profiles environment, inbound traffic to Azure Container Apps is routed through the public IP that exists in the [managed resource group](./networking.md#workload-profiles-environment-1) rather than through your subnet. This means that locking down inbound traffic via NSG or Firewall on an external workload profiles environment isn't supported. For more information, see [Networking in Azure Container Apps environments](./networking.md#user-defined-routes-udr).
20
20
21
21
In the Consumption only environment, custom user-defined routes (UDRs) and ExpressRoutes aren't supported.
22
22
23
23
## NSG allow rules
24
24
25
-
The following tables describe how to configure a collection of NSG allow rules.
26
-
>[!NOTE]
27
-
> The subnet associated with a Container App Environment on the Consumption only environment requires a CIDR prefix of `/23` or larger. On the workload profiles environment (preview), a `/27` or larger is required.
25
+
The following tables describe how to configure a collection of NSG allow rules. The specific rules required depend on your [environment type](./environment.md#types).
28
26
29
27
### Inbound
30
28
31
-
| Protocol | Port | ServiceTag | Description |
32
-
|--|--|--|--|
33
-
| Any |\*| Infrastructure subnet address space | Allow communication between IPs in the infrastructure subnet. This address is passed as a parameter when you create an environment. For example, `10.0.0.0/21`. |
34
-
| Any |\*| AzureLoadBalancer | Allow the Azure infrastructure load balancer to communicate with your environment. |
> When using workload profiles, inbound NSG rules only apply for traffic going through your virtual network. If your container apps are set to accept traffic from the public internet, incoming traffic will go through the public endpoint instead of the virtual network.
37
33
38
-
The following service tags are required when using NSGs on the Consumption only environment:
| TCP | Your Client IPs |\*| Your container app's subnet<sup>1</sup> |`443`, `30,000-32,676`<sup>2</sup> | Allow your Client IPs to access Azure Container Apps. |
37
+
| TCP | AzureLoadBalancer |\*| Your container app's subnet |`30,000-32,676`<sup>2</sup> | Allow Azure Load Balancer to probe backend pools. |
39
38
40
-
| Protocol | Port | ServiceTag | Description
41
-
|--|--|--|--|
42
-
| UDP |`1194`|`AzureCloud.<REGION>`| Required for internal AKS secure connection between underlying nodes and control plane. Replace `<REGION>` with the region where your container app is deployed. |
43
-
| TCP |`9000`|`AzureCloud.<REGION>`| Required for internal AKS secure connection between underlying nodes and control plane. Replace `<REGION>` with the region where your container app is deployed. |
44
-
| TCP |`443`|`AzureMonitor`| Allows outbound calls to Azure Monitor. |
39
+
# [Consumption only environment](#tab/consumption-only-env)
45
40
46
-
The following service tags are required when using NSGs on the workload profiles environment:
| TCP | Your Client IPs |\*| Your container app's subnet<sup>1</sup> |`443`| Allow your Client IPs to access Azure Container Apps. |
44
+
| TCP | AzureLoadBalancer |\*| Your container app's subnet |`30,000-32,676`<sup>2</sup> | Allow Azure Load Balancer to probe backend pools. |
45
+
46
+
---
47
+
48
+
<sup>1</sup> This address is passed as a parameter when you create an environment. For example, `10.0.0.0/21`.
49
+
<sup>2</sup> The full range is required when creating your Azure Container Apps as a port within the range will by dynamically allocated. Once created, the required ports are 2 immutable, static values, and you can update your NSG rules.
47
50
48
-
>[!Note]
49
-
> If you are using Azure Container Registry (ACR) with NSGs configured on your virtual network, create a private endpoint on your ACR to allow Container Apps to pull images through the virtual network.
50
51
51
-
| Protocol | Port | Service Tag | Description
52
-
|--|--|--|--|
53
-
| TCP |`443`|`MicrosoftContainerRegistry`| This is the service tag for container registry for microsoft containers. |
54
-
| TCP |`443`|`AzureFrontDoor.FirstParty`| This is a dependency of the `MicrosoftContainerRegistry` service tag. |
| TCP | Your container app's subnet<sup>1</sup> |\*| Your Container Registry | Your container registry's port | This is required to communicate with your container registry. For example, when using ACR, you need `AzureContainerRegistry` and `AzureActiveDirectory` for the destination, and the port will be your container registry's port unless using private endpoints.<sup>2</sup> |
59
+
| TCP | Your container app's subnet |\*|`AzureMonitor`|`443`| Allows outbound calls to Azure Monitor. |
60
+
| TCP | Your container app's subnet |\*|`MicrosoftContainerRegistry`|`443`| This is the service tag for Microsoft container registry for system containers. |
61
+
| TCP | Your container app's subnet |\*|`AzureFrontDoor.FirstParty`|`443`| This is a dependency of the `MicrosoftContainerRegistry` service tag. |
| TCP | Your container app's subnet<sup>1</sup> |\*| Your Container Registry | Your container registry's port | This is required to communicate with your container registry. For example, when using ACR, you need `AzureContainerRegistry` and `AzureActiveDirectory` for the destination, and the port will be your container registry's port unless using private endpoints.<sup>2</sup> |
71
+
| UDP | Your container app's subnet |\*|`AzureCloud.<REGION>`|`1194`| Required for internal AKS secure connection between underlying nodes and control plane. Replace `<REGION>` with the region where your container app is deployed. |
72
+
| TCP | Your container app's subnet |\*|`AzureCloud.<REGION>`|`9000`| Required for internal AKS secure connection between underlying nodes and control plane. Replace `<REGION>` with the region where your container app is deployed. |
73
+
| TCP | Your container app's subnet |\*|`AzureMonitor`|`443`| Allows outbound calls to Azure Monitor. |
74
+
| TCP | Your container app's subnet |\*|`AzureCloud`|`443`| Allowing all outbound on port `443` provides a way to allow all FQDN based outbound dependencies that don't have a static IP. |
| TCP | Your container app's subnet |\*|\*|`5671`| Container Apps control plane. |
77
+
| TCP | Your container app's subnet |\*|\*|`5672`| Container Apps control plane. |
78
+
| Any | Your container app's subnet |\*| Your container app's subnet |\*| Allow communication between IPs in your container app's subnet. |
79
+
80
+
---
57
81
58
-
The following IP rules are required when using NSGs on both the Consumption only environment and the workload profiles environment:
82
+
<sup>1</sup> This address is passed as a parameter when you create an environment. For example, `10.0.0.0/21`.
83
+
<sup>2</sup> If you're using Azure Container Registry (ACR) with NSGs configured on your virtual network, create a private endpoint on your ACR to allow Azure Container Apps to pull images through the virtual network. You don't need to add an NSG rule for ACR when configured with private endpoints.
59
84
60
-
| Protocol | Port | IP | Description |
61
-
|--|--|--|--|
62
-
| TCP |`443`|\*| Allowing all outbound on port `443` provides a way to allow all FQDN based outbound dependencies that don't have a static IP. |
63
-
| UDP |`123`|\*| NTP server. |
64
-
| TCP |`5671`|\*| Container Apps control plane. |
65
-
| TCP |`5672`|\*| Container Apps control plane. |
66
-
| Any |\*| Infrastructure subnet address space | Allow communication between IPs in the infrastructure subnet. This address is passed as a parameter when you create an environment. For example, `10.0.0.0/21`. |
67
85
68
86
#### Considerations
69
87
70
88
- If you're running HTTP servers, you might need to add ports `80` and `443`.
71
-
- Adding deny rules for some ports and protocols with lower priority than `65000`may cause service interruption and unexpected behavior.
89
+
- Adding deny rules for some ports and protocols with lower priority than `65000`might cause service interruption and unexpected behavior.
72
90
- Don't explicitly deny the Azure DNS address `168.63.128.16` in the outgoing NSG rules, or your Container Apps environment won't be able to function.
Copy file name to clipboardExpand all lines: articles/container-apps/user-defined-routes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Azure creates a default route table for your virtual networks on create. By impl
20
20
21
21
You can also use a NAT gateway or any other third party appliances instead of Azure Firewall.
22
22
23
-
For more information on networking concepts in Container Apps, see [Networking Environment in Azure Container Apps](./networking.md).
23
+
See the [configuring UDR with Azure Firewall](./networking.md#configuring-udr-with-azure-firewall)in [networking in Azure Container Apps](./networking.md) for more information.
24
24
25
25
## Prerequisites
26
26
@@ -66,7 +66,7 @@ A subnet called **AzureFirewallSubnet** is required in order to deploy a firewal
66
66
|**Virtual network**| Select the integrated virtual network. |
67
67
|**Public IP address**| Select an existing address or create one by selecting **Add new**. |
68
68
69
-
1. Select **Review + create**. After validation finishes, select **Create**. The validation step may take a few minutes to complete.
69
+
1. Select **Review + create**. After validation finishes, select **Create**. The validation step might take a few minutes to complete.
70
70
71
71
1. Once the deployment completes, select **Go to Resource**.
0 commit comments