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/vpn-gateway/site-to-site-certificate-authentication-gateway-portal.md
+30-23Lines changed: 30 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,34 @@
1
1
---
2
-
title: 'Create S2S VPN Connection Between On-premises Network and Azure Virtual Network - Certificate Authentication: Azure Portal'
2
+
title: 'Create S2S VPN Connection Between On-premises Network and Azure Virtual Network - Certificate Authentication: Azure portal'
3
3
titleSuffix: Azure VPN Gateway
4
4
description: Learn how to configure VPN Gateway server settings for site-to-site configurations - certificate authentication.
5
5
author: cherylmc
6
6
ms.service: azure-vpn-gateway
7
7
ms.topic: how-to
8
-
ms.date: 02/24/2026
8
+
ms.date: 03/25/2026
9
9
ms.author: cherylmc
10
10
11
-
#customer intent: As a network engineer, I want to create a site-to-site VPN connection between my on-premises location and my Azure virtual network using certificate authentication and Azure Key Vault.
12
-
13
11
# Customer intent: "As a network engineer, I want to establish a secure site-to-site VPN connection using certificate authentication, so that I can securely connect my on-premises network to my Azure virtual network."
In this article, you use the Azure portal to create a site-to-site (S2S) certificate authentication VPN gateway connection between your on-premises network and your virtual network. The steps for this configuration use Managed Identity, Azure Key Vault, and certificates. For more information about site-to-site certificate authentication, see [About site-to-site VPN connections with certificate authentication](site-to-site-certificate-authentication-gateway-about.md). If you need to create a site-to-site VPN connection that uses a shared key instead, see [Create a S2S VPN connection](tutorial-site-to-site-portal.md).
> Site-to-site certificate authentication is currently in Preview.
23
23
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
24
24
25
25
## Prerequisites
26
26
27
-
> [!IMPORTANT]
28
-
> Site-to-site certificate authentication isn't supported on Basic SKU VPN gateways. We recommend using VpnGw1AZ or higher.
29
-
30
27
* You already have a virtual network and a VPN gateway. If you don't, follow the steps to [Create a VPN gateway](tutorial-create-gateway-portal.md), then return to this page to configure your site-to-site certificate authentication connection.
* Make sure you have a compatible VPN device and someone who can configure it. For more information about compatible VPN devices and device configuration, see [About VPN devices](vpn-gateway-about-vpn-devices.md).
33
33
34
34
* Verify that you have an externally facing public IPv4 address for your VPN device.
@@ -41,7 +41,7 @@ This configuration requires a managed identity. For more information about manag
41
41
42
42
1. In the Azure portal, search for and select **Managed Identities**.
43
43
1. Select **Create**.
44
-
1. Input the required information. When you create the name, use something intuitive. For example, **site-to-site-managed** or **vpngwy-managed**. You need the name for key vault configuration steps. The **Resource group** doesn't have to be the same as the resource group that you use for your VPN gateway.
44
+
1. Input the required information. When you create the name, use something intuitive. For example, **s2s-user-managed** or **vpngw-managed**. You need the name for key vault configuration steps. The **Resource group** doesn't have to be the same as the resource group that you use for your VPN gateway.
45
45
1. Select **Review + create**.
46
46
1. The values validate. When validation completes, select **Create**.
47
47
@@ -70,6 +70,9 @@ Create a local network gateway by using the following values:
70
70
71
71
[!INCLUDE [Add a local network gateway](../../includes/vpn-gateway-add-local-network-gateway-portal-include.md)]
72
72
73
+
> [!NOTE]
74
+
> When the VPN Gateway is configured in active-active mode (as shown in the network diagram at the beginning of this article), repeat the process to create a second Local Network Gateway. This is required to establish a second IPsec tunnel to the on-premises VPN device using its second public IP address.
75
+
73
76
## <aname="generatecert"></a>Certificates
74
77
75
78
Site-to-site certificate authentication architecture relies on both inbound and outbound certificates.
@@ -105,14 +108,14 @@ Use PowerShell locally on your computer to generate certificates. The following
105
108
Use the New-SelfSignedCertificate cmdlet to create a self-signed root certificate. For more information about parameters, see [New-SelfSignedCertificate](/powershell/module/pki/new-selfsignedcertificate).
106
109
107
110
1. From a computer running Windows 10 or later, or Windows Server 2016, open a Windows PowerShell console with elevated privileges.
108
-
1. Create a self-signed root certificate. The following example creates a self-signed root certificate named 'VPNRootCA01', which is automatically installed in **Certificates-Current User\Personal\Certificates**. Once the certificate is created, you can view it by opening *certmgr.msc*, or *Manage User Certificates*.
111
+
1. Create a self-signed root certificate. The following example creates a self-signed root certificate named 'AzRootCA1', which is automatically installed in **Certificates-Current User\Personal\Certificates**. Once the certificate is created, you can view it by opening *certmgr.msc*, or *Manage User Certificates*.
109
112
110
113
Make any needed modifications before using this example. The 'NotAfter' parameter is optional. By default, without this parameter, the certificate expires in one year.
111
114
112
115
```powershell
113
116
$params = @{
114
117
Type = 'Custom'
115
-
Subject = 'CN=VPNRootCA01'
118
+
Subject = 'CN=AzRootCA1'
116
119
KeySpec = 'Signature'
117
120
KeyExportPolicy = 'Exportable'
118
121
KeyUsage = 'CertSign'
@@ -138,7 +141,7 @@ These examples use the [New-SelfSignedCertificate](/powershell/module/pki/new-se
138
141
139
142
$params = @{
140
143
Type = 'Custom'
141
-
Subject = 'CN=Outbound-certificate'
144
+
Subject = 'CN=az-outbound-cert1'
142
145
KeySpec = 'Signature'
143
146
KeyExportPolicy = 'Exportable'
144
147
KeyLength = 2048
@@ -158,7 +161,7 @@ These examples use the [New-SelfSignedCertificate](/powershell/module/pki/new-se
158
161
159
162
$params = @{
160
163
Type = 'Custom'
161
-
Subject = 'CN=Inbound-certificate'
164
+
Subject = 'CN=on-prem-s2s-1'
162
165
KeySpec = 'Signature'
163
166
KeyExportPolicy = 'Exportable'
164
167
KeyLength = 2048
@@ -224,7 +227,7 @@ This configuration requires Azure Key Vault. The following steps create a key va
224
227
225
228
1. In the Azure portal, search for **Key Vaults**. On the **Key vaults** page, select **+Create**.
226
229
1. On the **Create a key vault** page, fill out the required information. The resource group doesn't have to be the same as the resource group that you used for your VPN gateway.
227
-
1. On the **Access configuration** tab, for Permission model, select **Vault access policy**.
230
+
1. On the **Access configuration** tab, for Permission model, select **Azure role-based control (recommended)**.
228
231
1. Don't fill out any of the other fields.
229
232
1. Select **Review + create**, then **Create** the key vault.
230
233
@@ -242,14 +245,18 @@ The following steps help you upload the outbound certificate information to Azur
242
245
1. Input the password used to protect the certificate information.
243
246
1. Select **Create** to upload the certificate file.
244
247
245
-
## Add the Managed Identity to your key vault
248
+
## Grant the user-assigned managed identity access to the Key Vault using built-in RBAC roles
246
249
247
-
1. Go to your key vault. In the left pane, open the **Access policies** page.
248
-
1. Select **+Create**.
249
-
1. On the **Create an access policy** page, for **Secret Management Options** and **Certificate Management Operations**, select **Select all**.
250
-
1. Select **Next** to move to the **Principal** page.
251
-
1. On the **Principal** page, search and select the Managed Identity that you created earlier.
252
-
1. Select **Next** and advance to the **Review + create** page. Select **Create**.
250
+
1. Open the Key Vault and select **Access control (IAM)**.
251
+
1. Select **Add**, then choose **Add role assignment**.
252
+
1. In **Search by role name**, enter **Key Vault Secrets User**, select the built-in role, then select **Next**.
253
+
1. On the **Members** tab, for **Assign access to**, select **Managed identity**.
254
+
1. Select **+ Select members**. In **Select managed identities**, set **Managed identity** to **User-assigned managed identity**, then choose the user-assigned managed identity you created earlier.
255
+
1. Select **Next**, review the settings, then select **Review + assign** to apply the role assignment.
256
+
1. Repeat the previous steps to assign the **Key Vault Certificate User** role to the same user-assigned managed identity. This is required; otherwise, the managed identity can't access the outbound certificate stored in Key Vault.
257
+
258
+
> [!NOTE]
259
+
> RBAC role assignment changes aren't applied immediately to Key Vault. Before proceeding to the next step, verify under **Role assignments** that both built-in roles **Key Vault Secrets User** and **Key Vault Certificate User** are present.
253
260
254
261
## <aname="VPNDevice"></a>Configure your VPN device
255
262
@@ -275,7 +282,7 @@ Before moving forward, gather the following information for the required configu
275
282
1. Click the line for your certificate version.
276
283
1. Copy the path next to **Certificate Identifier**. The path is specific to the certificate.
0 commit comments