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/user-defined-routes.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,32 +16,33 @@ ms.date: 03/29/2023
16
16
17
17
This article shows you how to use user defined routes (UDR) with [Azure Firewall](../firewall/overview.md) to lock down outbound traffic from your Container Apps to back-end Azure resources or other network resources.
18
18
19
-
Azure creates a default route table for your virtual networks on create. By implementing a user-defined route table, you can control how traffic is routed within your virtual network. In this guide, you'll setup UDR on the Container Apps virtual network to restrict outbound traffic with Azure Firewall.
19
+
Azure creates a default route table for your virtual networks on create. By implementing a user-defined route table, you can control how traffic is routed within your virtual network. In this guide, your setup UDR on the Container Apps virtual network to restrict outbound traffic with Azure Firewall.
20
20
21
-
You can also use a NAT gateway or any other 3rd party appliances instead of Azure Firewall.
21
+
You can also use a NAT gateway or any other third party appliances instead of Azure Firewall.
22
22
23
23
For more information on networking concepts in Container Apps, see [Networking Architecture in Azure Container Apps](./networking.md).
24
24
25
25
## Prerequisites
26
26
27
-
*An **internal**container app environment on the workload profiles architecture that's integrated with a custom virtual network. When you create an internal container app environment, your container app environment has no public IP addresses, and all traffic is routed through the virtual network. For more information, see the [guide for how to create a container app environment on the workload profiles architecture](./workload-profiles-manage-cli.md). Ensure that you're creating an **internal** environment.
27
+
***Internal environment**: An internal container app environment on the workload profiles architecture that's integrated with a custom virtual network. When you create an internal container app environment, your container app environment has no public IP addresses, and all traffic is routed through the virtual network. For more information, see the [guide for how to create a container app environment on the workload profiles architecture](./workload-profiles-manage-cli.md).
28
28
29
-
*In your container app, have a container that supports `curl` commands. You can use `curl` to verify the container app is deployed correctly. The *helloworld* container from the sample container image already supports `curl` commands.
29
+
***`curl` support**: Your container app must have a container that supports `curl` commands. You use `curl` to verify the container app is deployed correctly. The *helloworld* container from the sample container image already supports `curl` commands.
30
30
31
31
## Create the firewall subnet
32
32
33
33
A subnet called **AzureFirewallSubnet** is required in order to deploy a firewall into the integrated virtual network.
34
34
35
-
1.In the [Azure portal](https://portal.azure.com), navigate to the virtual network that's integrated with your app.
35
+
1.Open the virtual network that's integrated with your app in the [Azure portal](https://portal.azure.com).
36
36
37
37
1. From the menu on the left, select **Subnets**, then select **+ Subnet**.
38
38
39
39
1. Enter the following values:
40
40
41
41
| Setting | Action |
42
42
| ------------ | ---------------- |
43
-
|**Name**| Enter **AzureFirewallSubnet**. |
43
+
|**Name**| Enter **AzureFirewallSubnet**. |
44
44
| **Subnet address range** | Use the default or specify a [subnet range /26 or larger](../firewall/firewall-faq.yml#why-does-azure-firewall-need-a--26-subnet-size).
45
+
45
46
1. Select **Save**
46
47
47
48
## Deploy the firewall
@@ -73,7 +74,7 @@ A subnet called **AzureFirewallSubnet** is required in order to deploy a firewal
73
74
74
75
## Route all traffic to the firewall
75
76
76
-
Your virtual networks in Azure have default route tables in place upon create. By implementing a user-defined route table, you can control how traffic is routed within your virtual network. In the following steps, you create a UDR to route all traffic to your Azure Firewall.
77
+
Your virtual networks in Azure have default route tables in place when you create the network. By implementing a user-defined route table, you can control how traffic is routed within your virtual network. In the following steps, you create a UDR to route all traffic to your Azure Firewall.
77
78
78
79
1. On the Azure portal menu or the *Home* page, select **Create a resource**.
79
80
@@ -107,14 +108,14 @@ Your virtual networks in Azure have default route tables in place upon create. B
107
108
108
109
1. Select **Add** to create the route.
109
110
110
-
1. From the menu on the left, select **Subnets**, then select **Associate** to associate your route table with the subnet your Container App is integrated with.
111
+
1. From the menu on the left, select **Subnets**, then select **Associate** to associate your route table with the container app's subnet.
111
112
112
113
1. Configure the *Associate subnet* with the following values:
113
114
114
115
| Setting | Action |
115
116
|--|--|
116
-
|**Address prefix**| Select the virtual network your container app is integrated with|
117
-
|**Next hop type**| Select the subnet your container app is integrated with|
117
+
|**Address prefix**| Select the virtual network for your container app.|
118
+
|**Next hop type**| Select the subnet your for container app.|
118
119
119
120
1. Select **OK**.
120
121
@@ -151,7 +152,7 @@ Now, all outbound traffic from your container app is routed to the firewall. Cur
151
152
|**Action**| Select *Allow*|
152
153
153
154
>[!Note]
154
-
> If you are using [Docker Hub registry](https://docs.docker.com/desktop/allow-list/) and want to access it through your firewall, you will need to add the following FQDNs to your rules destination list above: *hub.docker.com*, *registry-1.docker.io*, and *production.cloudflare.docker.com*.
155
+
> If you are using [Docker Hub registry](https://docs.docker.com/desktop/allow-list/) and want to access it through your firewall, you will need to add the following FQDNs to your rules destination list: *hub.docker.com*, *registry-1.docker.io*, and *production.cloudflare.docker.com*.
155
156
156
157
1. Select **Add**.
157
158
@@ -161,13 +162,13 @@ To verify your firewall configuration is set up correctly, you can use the `curl
161
162
162
163
1. Navigate to your Container App that is configured with Azure Firewall.
163
164
164
-
1. From the menu on the left, select **Console**, then select your container that supports the `curl` command. If you're using the helloworld container from the sample container image quickstart, you can run the `curl` command.
165
+
1. From the menu on the left, select **Console**, then select your container that supports the `curl` command. If you're using the *helloworld* container from the sample container image quickstart, you can run the `curl` command.
165
166
166
167
1. In the **Choose start up command** menu, select **/bin/sh**, and select **Connect**.
167
168
168
169
1. In the console, run `curl -s https://mcr.microsoft.com`. You should see a successful response as you added `mcr.microsoft.com` to the allowlist for your firewall policies.
169
170
170
-
1. Run `curl -s https://<fqdn-address>` for a URL that doesn't match any of your destination rules such as `example.com`. The example command would be `curl -s https://example.com`. You should get no response, which indicates that your firewall has blocked the request.
171
+
1. Run `curl -s https://<FQDN_ADDRESS>` for a URL that doesn't match any of your destination rules such as `example.com`. The example command would be `curl -s https://example.com`. You should get no response, which indicates that your firewall has blocked the request.
0 commit comments