|
1 | 1 | ---
|
2 |
| -title: Configure service firewall rules |
| 2 | +title: Configure public registry access |
3 | 3 | description: Configure IP rules to enable access to an Azure container registry from selected public IP addresses or address ranges.
|
4 | 4 | ms.topic: article
|
5 |
| -ms.date: 05/04/2020 |
| 5 | +ms.date: 05/19/2020 |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | # Configure public IP network rules
|
@@ -54,24 +54,46 @@ az acr network-rule add \
|
54 | 54 |
|
55 | 55 | ## Disable public network access
|
56 | 56 |
|
57 |
| -To limit traffic to virtual networks using [Private Link](container-registry-private-link.md), disable the public endpoint on the registry. Disabling the public endpoint overrides all firewall configurations. |
| 57 | +Optionally, disable the public endpoint on the registry. Disabling the public endpoint overrides all firewall configurations. For example, you might want to disable public access to a registry secured in a virtual network using [Private Link](container-registry-private-link.md). |
58 | 58 |
|
59 |
| -### Disable public access - Portal |
| 59 | +### Disable public access - CLI |
| 60 | + |
| 61 | +To disable public access using the Azure CLI, run [az acr update][az-acr-update] and set `--public-network-enabled` to `false`. |
| 62 | + |
| 63 | +> [!NOTE] |
| 64 | +> The `public-network-enabled` argument requires Azure CLI 2.6.0 or later. |
| 65 | +
|
| 66 | +```azurecli |
| 67 | +az acr update --name myContainerRegistry --public-network-enabled false |
| 68 | +``` |
| 69 | + |
| 70 | +### Disable public access - portal |
60 | 71 |
|
61 | 72 | 1. In the portal, navigate to your container registry and select **Settings > Networking**.
|
62 |
| -1. On the **Public access** tab, in **Allow public access**, select **Disabled**. Then select **Save**. |
| 73 | +1. On the **Public access** tab, in **Allow public network access**, select **Disabled**. Then select **Save**. |
63 | 74 |
|
64 | 75 | ![Disable public access][acr-access-disabled]
|
65 | 76 |
|
66 |
| -## Restore default registry access |
67 | 77 |
|
68 |
| -To restore the registry to allow access by default, update the default action. |
| 78 | +## Restore public network access |
| 79 | + |
| 80 | +To re-enable the public endpoint, update the networking settings to allow public access. Enabling the public endpoint overrides all firewall configurations. |
| 81 | + |
| 82 | +### Restore public access - CLI |
| 83 | + |
| 84 | +Run [az acr update][az-acr-update] and set `--public-network-enabled` to `true`. |
| 85 | + |
| 86 | +> [!NOTE] |
| 87 | +> The `public-network-enabled` argument requires Azure CLI 2.6.0 or later. |
| 88 | +
|
| 89 | +```azurecli |
| 90 | +az acr update --name myContainerRegistry --public-network-enabled true |
| 91 | +``` |
69 | 92 |
|
70 |
| -### Restore default registry access - portal |
| 93 | +### Restore public access - portal |
71 | 94 |
|
72 | 95 | 1. In the portal, navigate to your container registry and select **Settings > Networking**.
|
73 |
| -1. Under **Firewall**, select each address range, and then select the Delete icon. |
74 |
| -1. On the **Public access** tab, in **Allow public access**, select **All networks**. Then select **Save**. |
| 96 | +1. On the **Public access** tab, in **Allow public network access**, select **All networks**. Then select **Save**. |
75 | 97 |
|
76 | 98 | ![Public access from all networks][acr-access-all-networks]
|
77 | 99 |
|
|
0 commit comments