Skip to content

Commit 2b0b4b8

Browse files
authored
Update point-to-site-vpn-client-cert-linux.md
1 parent a617304 commit 2b0b4b8

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

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

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,17 @@ This section walks you through the configuration using the strongSwan CLI.
113113

114114
1. From the VPN client profile configuration files **Generic** folder, copy or move the **VpnServerRoot.cer** to **/etc/ipsec.d/cacerts**.
115115

116-
1. Copy or move **cp client.p12** to **/etc/ipsec.d/private/**. This file is the client certificate for the VPN gateway.
116+
1. Copy or move the p12 file you generated to **/etc/ipsec.d/private/**. This file is the client certificate for the VPN gateway. Use the following command:
117+
118+
```
119+
sudo cp "${USERNAME}.p12" /etc/ipsec.d/private/
120+
```
121+
122+
1. Run the following command to take note of your hostname. You’ll use this value in the next step.
123+
124+
```
125+
hostnamectl --static
126+
```
117127

118128
1. Open the **VpnSettings.xml** file and copy the `<VpnServer>` value. You’ll use this value in the next step.
119129

@@ -126,25 +136,31 @@ This section walks you through the configuration using the strongSwan CLI.
126136
leftfirewall=yes
127137
left=%any
128138
leftauth=eap-tls
129-
leftid=%client # use the DNS alternative name prefixed with the %
130-
right= Enter the VPN Server value here# Azure VPN gateway address
131-
rightid=% # Enter the VPN Server value here# Azure VPN gateway FQDN with %
139+
leftid=%client # use the hostname of your machine with % character prepended. Example: %client
140+
right= #Azure VPN gateway address. Example: azuregateway-xxx-xxx.vpn.azure.com
141+
rightid=% #Azure VPN gateway FQDN with % character prepended. Example: %azuregateway-xxx-xxx.vpn.azure.com
132142
rightsubnet=0.0.0.0/0
133143
leftsourceip=%config
134144
auto=add
135145
```
146+
147+
136148

137-
1. Add the following values to **/etc/ipsec.secrets**.
149+
1. Add the secret values to **/etc/ipsec.secrets**.
138150

151+
The name of the p.12 file must match what you have used earlier.
152+
The password must also match the password chosen when generating the certificates.
153+
154+
This is an example command to run on a machine which hostname is "client" and certificate password is "password"
139155
```cli
140156
: P12 client.p12 'password' # key filename inside /etc/ipsec.d/private directory
141157
```
142158

143-
1. Run the following commands:
159+
1. Finally run the following commands:
144160

145161
```cli
146-
# ipsec restart
147-
# ipsec up azure
162+
sudo ipsec restart
163+
sudo ipsec up azure
148164
```
149165

150166
## <a name="openvpn"></a>OpenVPN steps

0 commit comments

Comments
 (0)