Azure Private Link allows you to create private endpoints for Azure Database for PostgreSQL flexible server to bring it inside your virtual network. This functionality is a recommended alternative to the networking capabilities provided by virtual network integration.
With Private Link, traffic between your virtual network and the service traverses the Microsoft backbone network. Exposing your service to the public internet is no longer necessary. You can create your own private link service in your virtual network and deliver it to your customers. Setup and consumption by using Private Link is consistent across Azure PaaS, customer-owned, and shared partner services.
Private Link is exposed to users through two Azure resource types:
A private endpoint adds a network interface to a resource, providing it with a private IP address assigned from your virtual network. After it's applied, you can communicate with this resource exclusively via the virtual network. For a list of PaaS services that support Private Link functionality, review the Private Link documentation. A private endpoint is a private IP address within a specific virtual network and a subnet.
Multiple private endpoints in different virtual networks or subnets, even if they have overlapping address spaces, can reference the same public service instance.
Key benefits of Private LinkPrivate Link provides the following benefits:
Clients can connect to the private endpoint from:
Clients can also connect from on-premises by using ExpressRoute, private peering, or VPN tunneling. The following simplified diagram shows the common use cases.
Supported features for Private LinkHere's a cross-feature availability matrix for private endpoints in Azure Database for PostgreSQL flexible server.
Feature Availability Notes High availability Yes Works as designed. Read replica Yes Works as designed. Read replica with virtual endpoints Yes Works as designed. Point-in-time restore Yes Works as designed. Allowing also public/internet access with firewall rules Yes Works as designed. Major version upgrade Yes Works as designed. Microsoft Entra authentication Yes Works as designed. Connection pooling with PGBouncer Yes Works as designed. Private endpoint DNS Yes Works as designed and documented. Encryption with customer-managed keys Yes Works as designed.Private endpoints can only be configured for servers that were created after Azure Database for PostgreSQL flexible server introduced the support for Private Link, and whose networking mode was configured to not use virtual network integration but Public access.
Servers which were created before that date, and whose networking mode was configured to not use virtual network integration but Public access, don't yet support the creation of private endpoints. The use of private endpoints isn't currently supported on servers created with virtual network integration.
Connect from an Azure VM in a peered virtual networkConfigure virtual network peering to establish connectivity to Azure Database for PostgreSQL flexible server from an Azure virtual machine (VM) in a peered virtual network.
Connect from an Azure VM in a network-to-network environmentConfigure a network-to-network VPN gateway connection to establish connectivity to an Azure Database for PostgreSQL flexible server from an Azure VM in a different region or subscription.
Connect from an on-premises environment over VPNTo establish connectivity from an on-premises environment to the Azure Database for PostgreSQL flexible server, choose and implement one of the options:
Network security and Private LinkWhen you use private endpoints, traffic is secured to a private-link resource. The platform validates network connections, allowing only those connections that reach the specified private-link resource. To access more subresources within the same Azure service, more private endpoints with corresponding targets are required. For example, for Azure Storage you would need separate private endpoints to access the file and blob subresources.
Private endpoints provide a privately accessible IP address for the Azure service but don't necessarily restrict public network access to it. All other Azure services require another access control, however. These controls provide an extra network security layer to your resources, providing protection that helps prevent access to the Azure service associated with the private-link resource.
Private endpoints support network policies. Network policies enable support for network security groups (NSGs), user-defined routes (UDRs), and application security groups (ASGs). For more information about enabling network policies for a private endpoint, see Manage network policies for private endpoints. To use an ASG with a private endpoint, see Configure an application security group with a private endpoint.
Private Link and DNSWhen you use a private endpoint, you need to connect to the same Azure service but use the private endpoint IP address. The intimate endpoint connection requires separate domain name system (DNS) settings to resolve the private IP address to the resource name.
Private DNS zones provide domain name resolution within a virtual network without a custom DNS solution. You link the private DNS zones to each virtual network to provide DNS services to that network.
Private DNS zones provide separate DNS zone names for each Azure service. For example, if you configured a Private DNS zone for the storage account blob service in the previous image, the DNS zone name is privatelink.blob.core.windows.net
. Review the Microsoft documentation to see more of the private DNS zone names for all Azure services.
Note
Private endpoint Private DNS zone configurations automatically generate only if you use the recommended naming scheme: privatelink.postgres.database.azure.com
. On newly provisioned public access (not virtual network integrated) servers, there is a change in the DNS layout. The server's FQDN now becomes a CNAME record in the form servername.postgres.database.azure.com
which points to an A record in one of the following formats:
server_name.privatelink.postgres.database.azure.com
.server_name.rs-<15 semi-random bytes>.postgres.database.azure.com
.DNS is a critical design article in the overall landing zone architecture. Some organizations might want to use their existing investments in DNS. Others might want to adopt native Azure capabilities for all their DNS needs.
You can use Azure DNS Private Resolver along with Azure Private DNS zones for cross-premises name resolution. DNS Private Resolver can forward a DNS request to another DNS server and also provides an IP address that can be used by an external DNS server to forward requests. So, external on-premises DNS servers are able to resolve names located in a Private DNS zone.
For more information on using DNS Private Resolver with an on-premises DNS forwarder to forward DNS traffic to Azure DNS, see:
The described solutions extend an on-premises network that already has a DNS solution in place to resolve resources in Azure.Microsoft
architecture.
Private DNS zones are typically hosted centrally in the same Azure subscription where the hub virtual network deploys. This central hosting practice is driven by cross-premises DNS name resolution and other needs for central DNS resolution, such as Microsoft Entra. In most cases, only networking and identity administrators have permissions to manage DNS records in the zones.
In such architecture, the following components are configured:
privatelink.postgres.database.azure.com
, for Azure Database for PostgreSQL flexible server).By default, network policies are disabled for a subnet in a virtual network. To utilize network policies like UDRs and NSGs support, you must enable network policy support for the subnet. This setting is applicable only to private endpoints within the subnet. This setting affects all private endpoints within the subnet. For other resources in the subnet, access is controlled based on security rules in the NSG.
You can enable network policies for NSGs only, for UDRs only, or for both. For more information, see Manage network policies for private endpoints.
Limitations to NSGs and private endpoints are listed in What is a private endpoint?.
Important
Protection against data leakage: A private endpoint is mapped to an instance of a PaaS resource instead of the entire service. Consumers can only connect to the specific resource. Access to any other resource in the service is blocked. This mechanism provides basic protection against data leakage risks.
Private Link combined with firewall rulesThe following situations and outcomes are possible when you use Private Link in combination with firewall rules:
If you don't configure any firewall rules, by default, traffic can't access the Azure Database for PostgreSQL flexible server.
If you configure public traffic or a service endpoint and you create private endpoints, different types of incoming traffic are authorized by the corresponding type of firewall rule.
If you don't configure any public traffic or service endpoint and you create private endpoints, the Azure Database for PostgreSQL flexible server is accessible only through private endpoints. If you don't configure public traffic or a service endpoint, after all approved private endpoints are rejected or deleted, no traffic can access the Azure Database for PostgreSQL flexible server.
When you use Private Link endpoints with Azure Database for PostgreSQL flexible server, connectivity issues might occur due to misconfigurations or network constraints. To troubleshoot these issues, verify the setup of private endpoints, DNS configurations, network security groups (NSGs), and route tables. Systematically addressing these areas can help you identify and resolve common problems, ensuring seamless connectivity and secure access to your database.
Connectivity issues with private endpoint-based networkingIf you have connectivity issues when you use private endpoint-based networking, check the following areas:
More information on troubleshooting private endpoints is also available in Troubleshoot Azure private endpoint connectivity problems.
DNS resolution with private endpoint-based networkingIf you have DNS resolution issues when you use private endpoint-based networking, check the following areas:
Private endpoints can only be configured for servers created after the introduction of Private Link. Servers that use virtual network (VNet) integration are not eligible for private endpoint configuration.
The number of private endpoints is not limited by the database service itself but rather by Azure networking constraintsâspecifically, the number of private endpoints that can be injected into a given subnet within a VNet 3.
Virtual Machines can connect to the database through private endpoints, provided they are correctly configured within the same virtual network or have appropriate routing in place.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4