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
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to configure VPN Gateway server settings for site-to-site
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/18/2026
9
9
ms.author: cherylmc
10
10
11
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.
@@ -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,6 +245,19 @@ 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
248
+
## Grant the user-assigned managed identity access to the Key Vault using built-in RBAC roles
249
+
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 steps above to assign the **Key Vault Certificate User** role to the same user-assigned managed identity. This is required; otherwise, the managed identity won't be able to 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.
260
+
245
261
## Add the Managed Identity to your key vault
246
262
247
263
1. Go to your key vault. In the left pane, open the **Access policies** page.
@@ -275,7 +291,7 @@ Before moving forward, gather the following information for the required configu
275
291
1. Click the line for your certificate version.
276
292
1. Copy the path next to **Certificate Identifier**. The path is specific to the certificate.
0 commit comments