Skip to content

Commit b357592

Browse files
authored
Merge pull request #113861 from dlepow/acrpl
[ACR] Private link - GA
2 parents eaa9f73 + c59dfe2 commit b357592

13 files changed

+312
-353
lines changed

articles/container-registry/TOC.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@
8787
href: container-registry-webhook.md
8888
- name: Security and authentication
8989
items:
90-
- name: Integrate with Azure Private Link (preview)
90+
- name: Restrict access using private endpoint
9191
href: container-registry-private-link.md
92-
- name: Limit access with virtual network (preview)
92+
- name: Configure service firewall rules
93+
href: container-registry-access-selected-networks.md
94+
- name: Restrict access using service endpoint (preview)
9395
href: container-registry-vnet.md
9496
- name: Encrypt with customer-managed key
9597
href: container-registry-customer-managed-keys.md
@@ -109,10 +111,10 @@
109111
href: container-registry-auth-kubernetes.md
110112
- name: Authenticate from Azure Kubernetes Service (AKS)
111113
href: ../aks/cluster-container-registry-integration.md?toc=/azure/container-registry/toc.json&bc=/azure/container-registry/breadcrumb/toc.json
114+
- name: Authenticate with repository-scoped token (preview)
115+
href: container-registry-repository-scoped-permissions.md
112116
- name: Role-based access control
113117
href: container-registry-roles.md
114-
- name: Repository-scoped permissions (preview)
115-
href: container-registry-repository-scoped-permissions.md
116118
- name: Content trust
117119
href: container-registry-content-trust.md
118120
- name: Image scanning with Security Center
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: Configure service firewall rules
3+
description: Configure IP rules to enable access to an Azure container registry from selected public IP addresses or address ranges.
4+
ms.topic: article
5+
ms.date: 05/04/2020
6+
---
7+
8+
# Configure public IP network rules
9+
10+
An Azure container registry by default accepts connections over the internet from hosts on any network. This article shows how to configure your container registry to allow access from only specific public IP addresses or address ranges. Equivalent steps using the Azure CLI and Azure portal are provided.
11+
12+
IP network rules are configured on the public registry endpoint. IP network rules do not apply to private endpoints configured with [Private Link](container-registry-private-link.md)
13+
14+
Configuring IP access rules is available in the **Premium** container registry service tier. For information about registry service tiers and limits, see [Azure Container Registry tiers](container-registry-skus.md).
15+
16+
## Access from selected public network - CLI
17+
18+
### Change default network access to registry
19+
20+
To limit access to a selected public network, first change the default action to deny access. Substitute the name of your registry in the following [az acr update][az-acr-update] command:
21+
22+
```azurecli
23+
az acr update --name myContainerRegistry --default-action Deny
24+
```
25+
26+
### Add network rule to registry
27+
28+
Use the [az acr network-rule add][az-acr-network-rule-add] command to add a network rule to your registry that allows access from a public IP address or range. For example, substitute the container registry's name and the public IP address of a VM in a virtual network.
29+
30+
```azurecli
31+
az acr network-rule add \
32+
--name mycontainerregistry \
33+
--ip-address <public-IP-address>
34+
```
35+
36+
> [!NOTE]
37+
> After adding a rule, it takes a few minutes for the rule to take effect.
38+
39+
## Access from selected public network - portal
40+
41+
1. In the portal, navigate to your container registry.
42+
1. Under **Settings**, select **Networking**.
43+
1. On the **Public access** tab, select to allow public access from **Selected networks**.
44+
1. Under **Firewall**, enter a public IP address, such as the public IP address of a VM in a virtual network. Or, enter an address range in CIDR notation that contains the VM's IP address.
45+
1. Select **Save**.
46+
47+
![Configure firewall rule for container registry][acr-access-selected-networks]
48+
49+
> [!NOTE]
50+
> After adding a rule, it takes a few minutes for the rule to take effect.
51+
52+
> [!TIP]
53+
> Optionally, enable registry access from a local client computer or IP address range. To allow this access, you need the computer's public IPv4 address. You can find this address by searching "what is my IP address" in an internet browser. The current client IPv4 address also appears automatically when you configure firewall settings on the **Networking** page in the portal.
54+
55+
## Disable public network access
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.
58+
59+
### Disable public access - Portal
60+
61+
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**.
63+
64+
![Disable public access][acr-access-disabled]
65+
66+
## Restore default registry access
67+
68+
To restore the registry to allow access by default, update the default action.
69+
70+
### Restore default registry access - portal
71+
72+
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**.
75+
76+
![Public access from all networks][acr-access-all-networks]
77+
78+
## Next steps
79+
80+
* To restrict access to a registry using a private endpoint in a virtual network, see [Configure Azure Private Link for an Azure container registry](container-registry-private-link.md).
81+
* If you need to set up registry access rules from behind a client firewall, see [Configure rules to access an Azure container registry behind a firewall](container-registry-firewall-access-rules.md).
82+
83+
[az-acr-login]: /cli/azure/acr#az-acr-login
84+
[az-acr-network-rule-add]: /cli/azure/acr/network-rule/#az-acr-network-rule-add
85+
[az-acr-network-rule-remove]: /cli/azure/acr/network-rule/#az-acr-network-rule-remove
86+
[az-acr-network-rule-list]: /cli/azure/acr/network-rule/#az-acr-network-rule-list
87+
[az-acr-run]: /cli/azure/acr#az-acr-run
88+
[az-acr-update]: /cli/azure/acr#az-acr-update
89+
[quickstart-portal]: container-registry-get-started-portal.md
90+
[quickstart-cli]: container-registry-get-started-azure-cli.md
91+
[azure-portal]: https://portal.azure.com
92+
93+
[acr-access-selected-networks]: ./media/container-registry-access-selected-networks/acr-access-selected-networks.png
94+
[acr-access-disabled]: ./media/container-registry-access-selected-networks/acr-access-disabled.png
95+
[acr-access-all-networks]: ./media/container-registry-access-selected-networks/acr-access-all-networks.png

articles/container-registry/container-registry-health-error-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This error means that the DNS for the given registry login server was pinged but
5252

5353
## CONNECTIVITY_FORBIDDEN_ERROR
5454

55-
This error means that the challenge endpoint for the given registry responded with a 403 Forbidden HTTP status. This error means that users don't have access to the registry, most likely because of a virtual network configuration. To see the currently configured firewall rules, run `az acr show --query networkRuleSet --name <registry>`.
55+
This error means that the challenge endpoint for the given registry responded with a 403 Forbidden HTTP status. This error means that users don't have access to the registry, most likely because of a virtual network configuration or because access to the registry's public endpoint is not allowed. To see the currently configured firewall rules, run `az acr show --query networkRuleSet --name <registry>`.
5656

5757
*Potential solutions*: Remove virtual network rules, or add the current client IP address to the allowed list.
5858

0 commit comments

Comments
 (0)