Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article walks you through configuring a standard service endpoint using the Azure portal. You create a public IP address as a network identifier, associate it with service endpoints on a subnet, configure a network security perimeter, and validate connectivity.
Important
Standard service endpoint is currently in public preview. This preview is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Prerequisites
An Azure account with an active subscription. If you don't have one, create an account for free.
Network Contributor role or higher on the subscription. Specifically, you need the
Microsoft.Network/publicIPAddresses/joinServiceEndpointNetworkIdentifier/actionpermission. For more information, see network security perimeter role-based access control requirements.The AllowServiceEndpointNetworkIdentifier feature must be registered in your subscription. Use the following steps to register the feature:
Sign in to the Azure portal.
In the search box at the top of the portal, enter Subscriptions. Select Subscriptions in the search results.
Select the subscription you want to enable the feature for.
In the left menu, select Preview features under Settings.
In the search box, enter AllowServiceEndpointNetworkIdentifier.
Select AllowServiceEndpointNetworkIdentifier in the results, and then select Register.
Wait for the registration state to change to Registered. You can select Refresh to update the status.
Create a resource group
Sign in to the Azure portal with your Azure account.
In the search box at the top of the portal, enter Resource group. Select Resource groups in the search results.
Select + Create.
In the Basics tab of Create a resource group, enter, or select the following information:
Setting Value Subscription Select your subscription. Resource group Enter test-rg. Region Select East US 2. Select Review + create.
Select Create.
Create a virtual network
In the search box at the top of the portal, enter Virtual network. Select Virtual networks in the search results.
Select + Create.
On the Basics tab of Create virtual network, enter, or select the following information:
Setting Value Project details Subscription Select your subscription. Resource group Select test-rg. Instance details Name Enter vnet-1. Region Select East US 2. Select Next to proceed to the Security tab.
Select Next to proceed to the IP Addresses tab.
In the address space box in Subnets, select the default subnet.
In Edit subnet, enter, or select the following information:
Setting Value Subnet details Subnet template Leave the default Default. Name Enter subnet-1. Starting address Leave the default of 10.0.0.0. Subnet size Leave the default of /24 (256 addresses). Select Save.
Select Review + create at the bottom of the screen, and when validation passes, select Create.
Create a NAT gateway
Create a NAT gateway v2 and associate it with subnet-1 to provide outbound internet connectivity for the virtual machine.
In the search box at the top of the portal, enter NAT gateway. Select NAT gateways in the search results.
Select + Create.
On the Basics tab of Create network address translation (NAT) gateway, enter or select the following information:
Setting Value Project details Subscription Select your subscription. Resource group Select test-rg. Instance details NAT gateway name Enter nat-gateway. Region Select East US 2. Tier Select Standard V2. Availability zone Select No zone. TCP idle timeout (minutes) Leave the default of 4. Select the Outbound IP tab.
Next to Public IP addresses, select Create a new public IP address.
Enter public-ip-nat for the name, and then select OK.
Select the Networking tab.
Select vnet-1 for the virtual network.
Select the checkbox next to subnet-1.
Select Review + create, then select Create.
Create a virtual machine
The following procedure creates a VM named vm-1 in the virtual network. The virtual machine is used to validate connectivity after configuration.
In the portal, search for and select Virtual machines.
In Virtual machines, select + Create, and then select Azure virtual machine.
On the Basics tab of Create a virtual machine, enter or select the following information:
Setting Value Project details Subscription Select your subscription. Resource group Select test-rg. Instance details Virtual machine name Enter vm-1. Region Select East US 2. Availability options Select No infrastructure redundancy required. Security type Leave the default of Standard. Image Select Ubuntu Server 24.04 LTS - x64 Gen2. VM architecture Leave the default of x64. Size Select a size. Administrator account Authentication type Select SSH public key. Username Enter azureuser. SSH public key source Select Generate new key pair. Key pair name Enter vm-1-key. Inbound port rules Public inbound ports Select None. Select the Networking tab. Enter or select the following information:
Setting Value Network interface Virtual network Select vnet-1. Subnet Select subnet-1 (10.0.0.0/24). Public IP Select None. NIC network security group Select Basic. Leave the rest of the settings at the defaults and select Review + create.
Review the settings and select Create.
Note
Virtual machines in a virtual network with an Azure Bastion host don't need public IP addresses. Bastion provides the public IP, and the VMs use private IPs to communicate within the network. You can remove the public IPs from any VMs in Bastion-hosted virtual networks. For more information, see Dissociate a public IP address from an Azure VM.
Note
Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the backend pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP address that isn't configurable.
The default outbound access IP is disabled when one of the following events happens:
- A public IP address is assigned to the VM.
- The VM is placed in the backend pool of a standard load balancer, with or without outbound rules.
- An Azure NAT Gateway resource is assigned to the subnet of the VM.
VMs that you create by using virtual machine scale sets in flexible orchestration mode don't have default outbound access.
For more information about outbound connections in Azure, see Default outbound access in Azure and Use Source Network Address Translation (SNAT) for outbound connections.
Install tools on the virtual machine
Install cifs-utils and Azure CLI on the virtual machine by running a shell script through the Azure portal.
In the search box at the top of the portal, enter Virtual machines. Select Virtual machines in the search results.
Select vm-1.
Under Operations, select Run command.
Select RunShellScript.
In the Run Command Script pane, enter the following script:
#!/bin/bash sudo apt-get update sudo apt-get install -y cifs-utils curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bashSelect Run.
Wait for the script to complete. The output pane displays the installation progress and confirms successful installation.
Create a storage account
Create an Azure storage account with a file share to use as the PaaS resource for testing connectivity through the service endpoint.
In the search box at the top of the portal, enter Storage accounts. Select Storage accounts in the search results.
Select + Create.
On the Basics tab of Create a storage account, enter or select the following information:
Setting Value Project details Subscription Select your subscription. Resource group Select test-rg. Instance details Storage account name Enter a globally unique name, such as storage1<unique-id>**. Region Select East US 2. Primary service Select Azure Files. Performance Select Standard. Redundancy Select Locally redundant storage (LRS). Select Review + create, then select Create.
After the storage account is created, navigate to the storage account resource.
Under Data storage, select File shares.
Select + File share.
Enter fileshare-1 for the name, and then select Create.
Create a public IP prefix
Create a public IP prefix and a public IP address instance to use as a network identifier.
In the Azure portal, search for and select Public IP Prefixes.
Select + Create.
Enter the following information:
Setting Value Subscription Select your subscription. Resource group Select test-rg. Name Enter public-ip-prefix. Region Select East US 2. IP version Select IPv4. Prefix size Select a prefix size based on your needs. Select Review + create, then select Create.
After the prefix is created, create a public IP address from the prefix. Search for and select Public IP addresses, then select + Create. Associate it with the prefix you created.
Configure service endpoints with a network identifier
This step is the key configuration for a standard service endpoint. You associate a public IP address as a network identifier with service endpoints on a subnet.
A network identifier is a public IP address that you assign to your service endpoint. The public IP isn't used for network routing decisions. When you create a public IP address within your subscription, it's automatically assigned from your service's designated IP pool. Services inside the network security perimeter use this public IP address to recognize service endpoint traffic and configure appropriate access rules.
In the Azure portal, search for and select Virtual networks.
Select vnet-1.
Under Settings, select Subnets.
Select subnet-1.
Under Service endpoints, select Microsoft.Storage.
In the Network identifier dropdown, select the public IP address you created in the previous step.
Note
The same public IP address can be assigned to all subnets in a region within a subscription. The network identifier is supported across subscriptions during the public preview.
Select Save.
Create a network security perimeter
Create a network security perimeter and associate your PaaS resources with it. If you already have a network security perimeter, skip to Create a network security perimeter inbound access rule.
For detailed steps, see Quickstart: Create a network security perimeter - Azure portal.
In the Azure portal, search for and select Network security perimeters.
Select + Create.
Enter the following information:
Setting Value Subscription Select your subscription. Resource group Select test-rg. Name Enter nsp-1. Region Select East US 2. Profile name Enter profile-1. Select the Resources tab.
Select + Add and add your storage account (for example, storage1<unique-id>**).
Select Review + create, then select Create.
Create a network security perimeter inbound access rule
Add an IP-based inbound access rule in the network security perimeter to authorize traffic from your network identifier. This rule matches the public IP address to enable connectivity from your service endpoints.
In the Azure portal, navigate to nsp-1.
Select profile-1.
Under Inbound access rules, select + Add.
Enter the following information:
Setting Value Rule name Enter allow-se-standard. Source type Select IP address ranges. Allowed Sources Enter the public IP address or prefix associated with your network identifier. Select Add.
Validate connectivity
Connect to your virtual machine with Azure Bastion and test connectivity to the storage account to validate that traffic is authorized by the network security perimeter inbound access rule.
Connect to the virtual machine
In the search box at the top of the portal, enter Virtual machines. Select Virtual machines in the search results.
Select vm-1.
Select Connect, then select Connect via Bastion.
In the Bastion page, enter the following information:
Setting Value Authentication Type Select SSH Private Key from Local File. Username Enter azureuser. Local File Select the vm-1-key.pem file you downloaded when you created the virtual machine. Select Connect.
Test connectivity to the storage account
In the SSH session on vm-1, sign in to Azure CLI:
az loginMount the Azure file share to validate connectivity to the storage account through the service endpoint. Replace
<storage-account-name>with the name of your storage account:sudo mkdir -p /mnt/fileshare-1 STORAGE_KEY=$(az storage account keys list \ --resource-group test-rg \ --account-name <storage-account-name> \ --query "[0].value" -o tsv) sudo mount -t cifs //<storage-account-name>.file.core.windows.net/fileshare-1 /mnt/fileshare-1 \ -o username=<storage-account-name>,password=$STORAGE_KEY,serverino,nosharesock,actimeo=30,mfsymlinksVerify that the file share mounts successfully by listing the mount:
df -h /mnt/fileshare-1To confirm that the inbound access rule is working, check the network security perimeter diagnostic logs:
- Navigate to nsp-1 in the Azure portal.
- Under Monitoring, check the diagnostic logs.
- Verify that the data plane traffic from your service endpoint is approved by the network security perimeter inbound access rule.
For more information about network security perimeter diagnostic logs, see Diagnostic logging for network security perimeter.
Clean up resources
When you no longer need the resources created in this article, delete the resource group that contains them. Deleting the resource group also deletes the virtual network, public IP prefix, network security perimeter, and all related resources.
In the Azure portal, search for and select Resource groups.
Select test-rg.
Select Delete resource group.
Enter the resource group name and select Delete.