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/ai-services/openai/how-to/network.md
+36-20Lines changed: 36 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,32 @@
1
+
---
2
+
title: 'Securing Azure OpenAI inside a virtual network with private endpoints'
3
+
titleSuffix: Azure OpenAI
4
+
description: How to secure your Azure OpenAI resource inside a virtual network with private endpoints
5
+
manager: nitinme
6
+
ms.service: azure-ai-openai
7
+
ms.topic: how-to
8
+
ms.date: 04/25/2025
9
+
author: mrbullwinkle
10
+
ms.author: mbullwin
11
+
recommendations: false
12
+
---
13
+
1
14
# Configure Azure OpenAI networking
2
15
3
16
In this article, learn how to create and connect to a secure Azure OpenAI resource. The steps in this article use an Azure Virtual Network to create a security boundary for your Azure OpenAI resource.
4
17
5
18
After completing this article, you'll have the following architecture:
6
19
7
-
- An Azure Virtual Network, with a subnet where your Azure OpenAI script will reside
20
+
- An Azure Virtual Network, with a subnet where your Azure OpenAI resource will reside.
8
21
- An Azure OpenAI resource that uses a private endpoint to communicate using the virtual network.
9
22
- Azure Bastion, which allows you to use your browser to securely communicate with the jump box VM inside the virtual network.
10
23
- An Azure Virtual Machine that you can remotely connect to and access resources secured inside the virtual network.
11
24
12
25
## Prerequisites
13
26
14
-
Familiarity with Azure Virtual Networks and IP networking. If you aren't familiar, try the Fundamentals of computer networking module.
27
+
Familiarity with Azure Virtual Networks and IP networking. If you aren't familiar, try the [Fundamentals of computer networking module](/training/modules/network-fundamentals/).
15
28
16
-
For more on networking in Azure AI Services resource, see Configure Virtual Networks for Azure AI services.
29
+
For more on networking in Azure AI Services resource, see [Configure Virtual Networks for Azure AI services](/azure/ai-services/cognitive-services-virtual-networks).
17
30
18
31
## Create a virtual network
19
32
@@ -22,7 +35,7 @@ To create a virtual network, use the following steps:
22
35
1. In the [Azure portal](https://portal.azure.com), select the portal menu in the upper left corner. From the menu, select **+ Create a resource** and then enter **Virtual Network** in the search field. Select the Virtual Network entry, and then select **Create**.
23
36
2. From the **Basics** tab, select the Azure subscription to use for this resource and then select or create a new resource group. Under Instance details, enter a friendly name for your virtual network and select the region to create it in.
24
37
25
-
[!network-basics]
38
+
:::image type="content" source="../../media/how-to/global-batch/network-basics.png" alt-text="Screenshot of virtual network setup." lightbox="../../media/how-to/global-batch/network-basics.png":::
26
39
27
40
1. Accept the default settings for **Security** and IP **addresses**. A subnet titled "default" will be created for your virtual network. Best practice is to create another subnet to delegate all private endpoints.
28
41
1. Select **Review + create**.
@@ -39,17 +52,17 @@ To create a virtual network, use the following steps:
39
52
1. In the Azure portal, select the Azure OpenAI resource you created. In Resource Management, navigate to the Networking tab.
40
53
2. Under Allow access from, select Disabled. Disabled ensures no networks can access this resource. Private endpoint connections will be the exclusive way to access this resource. Select Save to save the settings.
41
54
42
-
[!network-disabled]
55
+
:::image type="content" source="../../media/how-to/global-batch/network-disabled.png" alt-text="Screenshot of resource network disabled UX." lightbox="../../media/how-to/global-batch/network-disabled.png":::
43
56
44
57
1. Navigate to the Private endpoint connections tab and select **+ Private endpoint**.
45
58
46
-
[!private-endpoint]
59
+
:::image type="content" source="../../media/how-to/global-batch/private-endpoint.png" alt-text="Screenshot of private endpoint connections tab." lightbox="../../media/how-to/global-batch/private-endpoint.png":::
47
60
48
61
1. From the Basics tab, select the Azure subscription to use for this resource and then select or create a new resource group. Under Instance details, enter a name for your resource and select the region to create it in. The region you create the private network in must be the same as the region you chose to create your virtual network in. The network interface name will automatically use the name and will add "-nic".
49
62
50
-
[!create-private-endpoint]
63
+
:::image type="content" source="../../media/how-to/global-batch/create-private-endpoint.png" alt-text="Screenshot of create private endpoint." lightbox="../../media/how-to/global-batch/create-private-endpoint.png":::
51
64
52
-
1. From the Resource tab, the Resource type should be Microsoft.CognitiveServices/accounts. For Target sub-resource, select "account".
65
+
1. From the Resource tab, the Resource type should be `Microsoft.CognitiveServices/accounts`. For Target sub-resource, select **account**.
53
66
54
67
1. From the Virtual Network tab, use the following values:
55
68
- Virtual network: The virtual network you created earlier.
@@ -61,19 +74,20 @@ To create a virtual network, use the following steps:
61
74
- Subscription: The same Azure subscription that contains the previous resources.
62
75
- Resource group: The same Azure resource group that contains the previous resources.
63
76
64
-
[!create-private-link]
77
+
:::image type="content" source="../../media/how-to/global-batch/create-private-link.png" alt-text="Screenshot of create private link DNS tab." lightbox="../../media/how-to/global-batch/create-private-link.png":::
65
78
66
79
1. Select **Review + create**. Verify that the information is correct, and then select **Create**.
67
80
68
81
1. Once the private endpoint is created, you should see your private endpoint connection name, state, and description. You can select the link to the private endpoint and view further details on its DNS configuration.
69
82
70
-
[!deployment-details]
83
+
84
+
:::image type="content" source="../../media/how-to/global-batch/deployment-details.png" alt-text="Screenshot of deployment details post private link and endpoint deployment." lightbox="../../media/how-to/global-batch/deployment-details.png":::
71
85
72
86
## Configure gateway and client for local network access
73
87
74
88
To access the Azure OpenAI Service from your local or on-premises client machines, there are two approaches. One approach is to configure a virtual machine deployed in the same virtual network. Another approach is to configure Azure VPN Gateway and Azure VPN Client.
75
89
76
-
For guidelines to set up a virtual network gateway for your virtual network, see Tutorial – Create & manage a VPN gateway. To add point-to-site configuration, and enable Microsoft Entra ID based authentication, see Configure P2S VPN gateway for Microsoft Entra ID authentication. Download the Azure VPN Client profile configuration package, unzip, and import the AzureVPN/azurevpnconfig.xml file to your Azure VPN client.
90
+
For guidelines to set up a virtual network gateway for your virtual network, see [Tutorial – Create & manage a VPN gateway](/azure/vpn-gateway/tutorial-create-gateway-portal#VNetGateway). To add point-to-site configuration, and enable Microsoft Entra ID based authentication, see [Configure a VPN gateway for Microsoft Entra ID](/azure/vpn-gateway/openvpn-azure-ad-tenant#enable-authentication) authentication. Download the Azure VPN Client profile configuration package, unzip, and import the AzureVPN/azurevpnconfig.xml file to your Azure VPN client.
77
91
78
92
Configure your local machine hosts file to point your resources host names to the private IPs in your virtual network. The hosts file is located at C:\Windows\System32\drivers\etc for Windows, and at /etc/hosts on Linux. Example: 10.0.0.5 contoso.openai.azure.com
79
93
@@ -90,7 +104,7 @@ To set up a basic hub and spoke architecture:
90
104
91
105
## Configure your Network Security Group (NSG)
92
106
93
-
Network Security Groups are used to control inbound and outbound traffic to network interfaces (NIC), VMs and subnets. You will need to configure NSG to allow traffic to and from Azure OpenAI. For more on configuring NSGs, see Azure network security groups overview.
107
+
Network Security Groups are used to control inbound and outbound traffic to network interfaces (NIC), VMs and subnets. You will need to configure NSG to allow traffic to and from Azure OpenAI. For more on configuring NSGs, see [Azure network security groups overview](/azure/virtual-network/network-security-groups-overview).
94
108
95
109
## Testing your configuration
96
110
@@ -110,17 +124,19 @@ You can test the network connection to Azure OpenAI using the Test-NetConnection
110
124
Test-NetConnection 10.0.0.4 -Port 443
111
125
```
112
126
113
-
[!powershell]
127
+
:::image type="content" source="../../media/how-to/global-batch/powershell.png" alt-text="Screenshot of network connection test with PowerShell" lightbox="../../media/how-to/global-batch/powershell.png":::
114
128
115
129
This command should succeed only from a machine that is on the same private network as your Azure OpenAI instance. If this command fails, it means there is a networking issue. Here are some possible causes:
116
130
117
-
1. DNS Issue: The Domain Name System (DNS) is responsible for translating domain names into IP addresses. If there's an issue with the DNS, it might not be able to correctly resolve the domain name of your Azure OpenAI instance to its IP address.
118
-
2. Machine Not on Private Network: If the machine you're running the command on is not on the same private network as your Azure OpenAI instance, the command will fail because it won't be able to reach the private IP address. Make sure that the machine is connected to the correct private network.
119
-
3. Customer Firewall Blocking: If there's a custom firewall set up between the machine and the Azure OpenAI instance, it might be blocking the connection. Firewalls are security measures that control incoming and outgoing network traffic based on predetermined security rules. You will need to check your firewall settings and make sure that traffic on port 443 is allowed.
131
+
1. DNS Issue: The Domain Name System (DNS) is responsible for translating domain names into IP addresses. If there's an issue with the DNS, it might not be able to correctly resolve the domain name of your Azure OpenAI instance to its IP address.
132
+
133
+
1. Machine Not on Private Network: If the machine you're running the command on is not on the same private network as your Azure OpenAI instance, the command will fail because it won't be able to reach the private IP address. Make sure that the machine is connected to the correct private network.
134
+
135
+
1. Customer Firewall Blocking: If there's a custom firewall set up between the machine and the Azure OpenAI instance, it might be blocking the connection. Firewalls are security measures that control incoming and outgoing network traffic based on predetermined security rules. You will need to check your firewall settings and make sure that traffic on port 443 is allowed.
120
136
121
137
## Next steps
122
138
123
-
- Explore the Azure security baseline for Azure OpenAI
124
-
- Explore the various Azure AI Services
125
-
- Learn how to Configure Virtual Networks for Azure AI services
126
-
- Azure OpenAI Private Endpoints: Connecting Across VNET's | Microsoft Community Hub
139
+
- Explore the [Azure security baseline for Azure OpenAI](/security/benchmark/azure/baselines/azure-openai-security-baseline#virtual-network-integration)
140
+
- Explore the various [Azure AI Services](/azure/ai-services/what-are-ai-services)
141
+
- Learn how to [Configure Virtual Networks for Azure AI services](/azure/ai-services/cognitive-services-virtual-networks?tabs=portal)
142
+
-[Azure OpenAI Private Endpoints: Connecting Across VNETs | Microsoft Community Hub](https://techcommunity.microsoft.com/blog/azurearchitectureblog/azure-openai-private-endpoints-connecting-across-vnet%E2%80%99s/3913325)
0 commit comments