Skip to content

Commit dbedad1

Browse files
authored
Merge pull request #294205 from cherylmc/vwan-linux
Azure VPN Client - Linux
2 parents 317c645 + 88a5c0d commit dbedad1

File tree

11 files changed

+155
-104
lines changed

11 files changed

+155
-104
lines changed

articles/virtual-wan/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@
216216
href: point-to-site-vpn-client-certificate-windows-openvpn-client-version-2.md
217217
- name: Version 3.x
218218
href: point-to-site-vpn-client-certificate-windows-openvpn-client-version-3.md
219+
- name: Linux clients
220+
items:
221+
- name: Azure VPN client
222+
href: point-to-site-azure-vpn-client-certificate-linux.md
219223
- name: macOS and iOS clients
220224
items:
221225
- name: Native VPN client
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: 'Configure P2S VPN clients - certificate authentication - Azure VPN Client - Linux'
3+
titleSuffix: Azure Virtual WAN
4+
description: Learn how to configure a Linux client to connect to Azure using a User VPN point-to-site connection, Open VPN, and the Azure VPN Client for Linux.
5+
author: cherylmc
6+
ms.service: azure-virtual-wan
7+
ms.custom: linux-related-content
8+
ms.topic: how-to
9+
ms.date: 02/06/2025
10+
ms.author: cherylmc
11+
---
12+
13+
# Configure Azure VPN Client – P2S User VPN certificate authentication – Linux (Preview)
14+
15+
This article helps you connect to your Azure virtual network (VNet) using the Azure VPN Client for Linux. These instructions apply to User VPN point-to-site (P2S) and **Certificate authentication** connections. The Azure VPN Client for Linux requires the **OpenVPN** tunnel type.
16+
17+
The VPN client configuration files that you generate are specific to the P2S User VPN gateway configuration. If there are changes to the P2S VPN configuration after you generate the files, such as changes to the VPN protocol type or authentication type, you need to generate new VPN client configuration files and apply the new configuration to all of the VPN clients that you want to connect.
18+
19+
[!INCLUDE [Linux versions](../../includes/vpn-gateway-azure-vpn-client-linux-supported-releases.md)]
20+
21+
## Before you begin
22+
23+
Verify that you are on the correct article. The following table shows the configuration articles available for Azure Virtual WAN P2S VPN clients. Steps differ, depending on the authentication type, tunnel type, and the client OS.
24+
25+
[!INCLUDE [P2S client configuration articles](../../includes/virtual-wan-vpn-client-install-articles.md)]
26+
27+
### Prerequisites
28+
29+
This article assumes that you've already performed the following prerequisites:
30+
31+
* You configured a virtual WAN according to the steps in the [Create User VPN point-to-site connections](virtual-wan-point-to-site-portal.md) article. Your User VPN configuration must use certificate authentication and the OpenVPN tunnel type.
32+
* You generated and downloaded the VPN client configuration files. For steps to generate a VPN client profile configuration package, see [Generate VPN client configuration files](virtual-wan-point-to-site-portal.md#p2sconfig).
33+
* You can either generate client certificates, or acquire the appropriate client certificates necessary for authentication.
34+
35+
[!INCLUDE [Configuration steps](../../includes/vpn-gateway-vwan-azure-vpn-client-certificate-linux.md)]
36+
37+
## Next steps
38+
39+
For additional steps, return to the [Create a Virtual WAN P2S User VPN connection](virtual-wan-point-to-site-portal.md) article.
Binary file not shown.
Binary file not shown.

articles/vpn-gateway/point-to-site-certificate-client-linux-azure-vpn-client.md

Lines changed: 2 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -29,106 +29,8 @@ This article assumes that you've already performed the following prerequisites:
2929
* The VPN gateway is configured for point-to-site certificate authentication and the OpenVPN tunnel type. See [Configure server settings for P2S VPN Gateway connections - certificate authentication](point-to-site-certificate-gateway.md) for steps.
3030
* VPN client profile configuration files have been generated and are available. See [Generate VPN client profile configuration files](point-to-site-certificate-gateway.md#profile-files) for steps.
3131

32-
### Connection requirements
33-
34-
To connect to Azure using the Azure VPN Client and certificate authentication, each connecting client requires the following items:
35-
36-
* The Azure VPN Client software must be installed and configured on each client.
37-
* The client must have the correct certificates installed locally.
38-
39-
### Workflow
40-
41-
The basic workflow is as follows:
42-
43-
1. Generate and install client certificates.
44-
1. Locate the VPN client profile configuration package that you generated in the [Configure server settings for P2S VPN Gateway connections - certificate authentication](point-to-site-certificate-gateway.md#profile-files) article.
45-
1. Download and configure the Azure VPN Client for Linux.
46-
1. Connect to Azure.
47-
48-
## Generate certificates
49-
50-
For certificate authentication, a client certificate must be installed on each client computer. The client certificate you want to use must be exported with the private key, and must contain all certificates in the certification path. Additionally, for some configurations, you'll also need to install root certificate information.
51-
52-
Generate the client public certificate data and private key in **.pem** format using the following commands. To run the commands, you need to have the public Root certificate **caCert.pem** and the private key of Root certificate **caKey.pem**. For more information, see [Generate and export certificates - Linux - OpenSSL](point-to-site-certificates-linux-openssl.md).
53-
54-
```
55-
export PASSWORD="password"
56-
export USERNAME=$(hostnamectl --static)
57-
58-
# Generate a private key
59-
openssl genrsa -out "${USERNAME}Key.pem" 2048
60-
61-
# Generate a CSR
62-
openssl req -new -key "${USERNAME}Key.pem" -out "${USERNAME}Req.pem" -subj "/CN=${USERNAME}"
63-
64-
# Sign the CSR using the CA certificate and key
65-
openssl x509 -req -days 365 -in "${USERNAME}Req.pem" -CA caCert.pem -CAkey caKey.pem -CAcreateserial -out "${USERNAME}Cert.pem" -extfile <(echo -e "subjectAltName=DNS:${USERNAME}\nextendedKeyUsage=clientAuth")
66-
```
67-
68-
## View VPN client profile configuration files
69-
70-
When you generate and download a VPN client profile configuration package, all the necessary configuration settings for VPN clients are contained in a VPN client profile configuration zip file. The VPN client profile configuration files are specific to the P2S VPN gateway configuration for the virtual network. If there are any changes to the P2S VPN configuration after you generate the files, such as changes to the VPN protocol type or authentication type, you need to generate new VPN client profile configuration files and apply the new configuration to all of the VPN clients that you want to connect.
71-
72-
Locate and unzip the VPN client profile configuration package you generated and downloaded (listed in the [Prerequisites](#prerequisites)). Open the **AzureVPN** folder. In this folder, you'll see either the **azurevpnconfig_cert.xml** file or the **azurevpnconfig.xml** file, depending on whether your P2S configuration includes multiple authentication types. The .xml file contains the settings you use to configure the VPN client profile.
73-
74-
If you don't see either file, or you don't have an **AzureVPN** folder, verify that your VPN gateway is configured to use the OpenVPN tunnel type and that certificate authentication is selected.
75-
76-
## Download the Azure VPN Client
77-
78-
Add the Microsoft repository list and install the Azure VPN Client for Linux using the following commands:
79-
80-
```
81-
# install curl utility
82-
sudo apt-get install curl
83-
84-
# Install Microsoft's public key
85-
curl -sSl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
86-
87-
# Install the production repo list for focal
88-
# For Ubuntu 20.04
89-
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-ubuntu-focal-prod.list
90-
91-
# Install the production repo list for jammy
92-
# For Ubuntu 22.04
93-
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-ubuntu-jammy-prod.list
94-
95-
sudo apt-get update
96-
97-
sudo apt-get install microsoft-azurevpnclient
98-
```
99-
100-
For more information about the repository, see [Linux Software Repository for Microsoft Products](/linux/packages).
101-
102-
## Configure the Azure VPN Client profile
103-
104-
1. Open the Azure VPN Client.
105-
1. On the bottom left of the page of the Linux VPN client, select **Import**.
106-
107-
:::image type="content" source="./media/azure-vpn-client-certificate-linux/import.png" alt-text="Screenshot of Azure VPN Client for Linux with Import." lightbox="./media/azure-vpn-client-certificate-linux/import.png":::
108-
1. In the window, navigate to either the **azurevpnconfig.xml** or **azurevpnconfig_cert.xml** file, select it, then select **Open**.
109-
1. To add **Client Certificate Public Data**, use the file picker and locate the related **.pem** files.
110-
111-
:::image type="content" source="./media/azure-vpn-client-certificate-linux/client-certificate-data.png" alt-text="Screenshot of Azure VPN Client for Linux with client certificate data selected." lightbox="./media/azure-vpn-client-certificate-linux/client-certificate-data.png":::
112-
1. To add the **Client Certificate Private Key**, use the picker and select the certificate files path in the text boxes for the private key, with file extension **.pem**.
113-
1. After the import validates (imports with no errors), select **Save**.
114-
1. In the left pane, locate the VPN connection profile you created. Select **Connect**.
115-
116-
:::image type="content" source="./media/azure-vpn-client-certificate-linux/connect.png" alt-text="Screenshot of Azure VPN Client for Linux Connect." lightbox="./media/azure-vpn-client-certificate-linux/connect.png":::
117-
1. When the client is successfully connected, the status shows as **Connected** with a green icon.
118-
119-
:::image type="content" source="./media/azure-vpn-client-certificate-linux/connected.png" alt-text="Screenshot of Azure VPN Client for Linux with client showing Connected." lightbox="./media/azure-vpn-client-certificate-linux/connected.png":::
120-
1. You can view the connection logs summary in the **Status Logs** on the main screen of the VPN client.
121-
122-
:::image type="content" source="./media/azure-vpn-client-certificate-linux/logs.png" alt-text="Screenshot of Azure VPN Client for Linux with client showing the status logs." lightbox="./media/azure-vpn-client-certificate-linux/logs.png":::
123-
124-
## Uninstall the Azure VPN Client
125-
126-
If you want to uninstall the Azure VPN Client, use the following command in the terminal:
127-
128-
```
129-
sudo apt remove microsoft-azurevpnclient
130-
```
32+
[!INCLUDE [Configuration steps](../../includes/vpn-gateway-vwan-azure-vpn-client-certificate-linux.md)]
13133

13234
## Next steps
13335

134-
For additional steps, return to the [P2S Azure portal](point-to-site-certificate-gateway.md) article.
36+
For additional steps, return to the [Create a VPN Gateway P2S VPN connection](point-to-site-certificate-gateway.md) article.

articles/vpn-gateway/point-to-site-certificates-linux-openssl.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This section helps you generate a self-signed root certificate. After you genera
3636

3737
## Client certificates
3838

39-
In this section, you generate the user certificate (client certificate). Certificate files are generated in the local directory in which you run the commands. You can use the same client certificate on each client computer, or generate certificates that are specific to each client. It's crucial is that the client certificate is signed by the root certificate.
39+
In this section, you generate the user certificate (client certificate). Certificate files are generated in the local directory in which you run the commands. You can use the same client certificate on each client computer, or generate certificates that are specific to each client. It's crucial that the client certificate is signed by the root certificate.
4040

4141
1. To generate a client certificate, use the following examples.
4242

@@ -62,4 +62,5 @@ In this section, you generate the user certificate (client certificate). Certifi
6262

6363
## Next steps
6464

65-
To continue configuration steps, see [Point-to-site certificate authentication](point-to-site-certificate-gateway.md#uploadfile).
65+
* To continue VPN Gateway configuration steps, see [Point-to-site certificate authentication](point-to-site-certificate-gateway.md#uploadfile).
66+
* To continue Virtual WAN configuration steps, see [Create a P2S User VPN connection](../virtual-wan/virtual-wan-point-to-site-portal.md).

includes/virtual-wan-vpn-client-install-articles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
author: cherylmc
33
ms.author: cherylmc
4-
ms.date: 02/04/2025
4+
ms.date: 02/06/2025
55
ms.service: azure-virtual-wan
66
ms.topic: include
77
---
@@ -14,7 +14,7 @@ ms.topic: include
1414
| | OpenVPN | Windows | [Azure VPN client](../articles/virtual-wan/vpn-client-certificate-windows.md)<br>[OpenVPN client version 2.x](../articles/virtual-wan/point-to-site-vpn-client-certificate-windows-openvpn-client-version-2.md)<br>[OpenVPN client version 3.x](../articles/virtual-wan/point-to-site-vpn-client-certificate-windows-openvpn-client-version-3.md) |
1515
| | OpenVPN | macOS | [OpenVPN client](../articles/virtual-wan/point-to-site-vpn-client-certificate-openvpn-mac.md) |
1616
| | OpenVPN | iOS | [OpenVPN client](../articles/virtual-wan/point-to-site-vpn-client-certificate-openvpn-ios.md) |
17-
| | OpenVPN |Linux | [Azure VPN client](../articles/vpn-gateway/point-to-site-certificate-client-linux-azure-vpn-client.md)<br>[OpenVPN client](../articles/vpn-gateway/point-to-site-vpn-client-certificate-openvpn-linux.md)|
17+
| | OpenVPN |Linux | [Azure VPN client](../articles/virtual-wan/point-to-site-azure-vpn-client-certificate-linux.md)<br>[OpenVPN client](../articles/vpn-gateway/point-to-site-vpn-client-certificate-openvpn-linux.md)|
1818
| Microsoft Entra ID | OpenVPN | Windows | [Azure VPN client](../articles/virtual-wan/openvpn-azure-ad-client.md) |
1919
| | OpenVPN | macOS | [Azure VPN client](../articles/virtual-wan/openvpn-azure-ad-client-mac.md) |
2020
| | OpenVPN| Linux |[Azure VPN client](../articles/vpn-gateway/point-to-site-entra-vpn-client-linux.md) |

0 commit comments

Comments
 (0)