Skip to content

Commit 7f7cb44

Browse files
Merge pull request #226589 from khdownie/kendownie020723
updating linux p2s vpn doc
2 parents 00a9751 + 9a705a3 commit 7f7cb44

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

articles/storage/files/storage-files-configure-p2s-vpn-linux.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: How to configure a Point-to-Site (P2S) VPN on Linux for use with Az
44
author: khdownie
55
ms.service: storage
66
ms.topic: how-to
7-
ms.date: 10/17/2022
7+
ms.date: 02/07/2023
88
ms.author: kendownie
99
ms.subservice: files
1010
---
@@ -31,7 +31,7 @@ The article details the steps to configure a Point-to-Site VPN on Linux to mount
3131
- A private endpoint for the storage account containing the Azure file share you want to mount on-premises. To learn how to create a private endpoint, see [Configuring Azure Files network endpoints](storage-files-networking-endpoints.md?tabs=azure-cli).
3232

3333
## Install required software
34-
The Azure virtual network gateway can provide VPN connections using several VPN protocols, including IPsec and OpenVPN. This article shows how to use IPsec and uses the strongSwan package to provide the support on Linux.
34+
The Azure virtual network gateway can provide VPN connections using several VPN protocols, including IPsec and OpenVPN. This article shows how to use IPsec and uses the strongSwan package to provide the support on Linux.
3535

3636
> Verified with Ubuntu 18.10.
3737
@@ -42,6 +42,12 @@ sudo apt install strongswan strongswan-pki libstrongswan-extra-plugins curl libx
4242
installDir="/etc/"
4343
```
4444

45+
If the installation fails or you get an error such as **EAP_IDENTITY not supported, sending EAP_NAK**, you might need to install extra plugins:
46+
47+
```bash
48+
sudo apt install -y libcharon-extra-plugins
49+
```
50+
4551
### Deploy a virtual network
4652
To access your Azure file share and other Azure resources from on-premises via a Point-to-Site VPN, you must create a virtual network, or VNet. The P2S VPN connection you will automatically create is a bridge between your on-premises Linux machine and this Azure virtual network.
4753

@@ -176,18 +182,20 @@ sudo cp "${installDir}ipsec.conf" "${installDir}ipsec.conf.backup"
176182
sudo cp "Generic/VpnServerRoot.cer_0" "${installDir}ipsec.d/cacerts"
177183
sudo cp "${username}.p12" "${installDir}ipsec.d/private"
178184
179-
echo -e "\nconn $virtualNetworkName" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
180-
echo -e "\tkeyexchange=$vpnType" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
181-
echo -e "\ttype=tunnel" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
182-
echo -e "\tleftfirewall=yes" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
183-
echo -e "\tleft=%any" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
184-
echo -e "\tleftauth=eap-tls" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
185-
echo -e "\tleftid=%client" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
186-
echo -e "\tright=$vpnServer" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
187-
echo -e "\trightid=%$vpnServer" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
188-
echo -e "\trightsubnet=$routes" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
189-
echo -e "\tleftsourceip=%config" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
190-
echo -e "\tauto=add" | sudo tee -a "${installDir}ipsec.conf" > /dev/null
185+
sudo tee -a "${installDir}ipsec.conf" <<EOF
186+
conn $virtualNetworkName
187+
keyexchange=$vpnType
188+
type=tunnel
189+
leftfirewall=yes
190+
left=%any
191+
leftauth=eap-tls
192+
leftid=%client
193+
right=$vpnServer
194+
rightid=%$vpnServer
195+
rightsubnet=$routes
196+
leftsourceip=%config
197+
auto=add
198+
EOF
191199
192200
echo ": P12 client.p12 '$password'" | sudo tee -a "${installDir}ipsec.secrets" > /dev/null
193201

0 commit comments

Comments
 (0)