Skip to content

Commit 6be376a

Browse files
author
Enrique Sanchez Vela
committed
Corrected issues with file names and location
1 parent 58da277 commit 6be376a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +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 the p12 file you generated to **/etc/ipsec.d/private/**. This file is the client certificate for the VPN gateway. Use the following command:
116+
1. Copy or move the files you generated to **/etc/ipsec.d/certs** and **/etc/ipsec.d/private/** respectively. These files are the client certificate and the private key, they need to be located in their corresponding directories. Use the following commands:
117117

118-
```
119-
cat ${USERNAME}Cert.pem ${USERNAME}Key.pem | sudo tee /etc/ipsec.d/private/myclientcert.pem
120-
sudo chmod go-rwx /etc/ipsec.d/private/myclientcert.pem
118+
```cli
119+
sudo cp ${USERNAME}Cert.pem /etc/ipsec.d/certs/
120+
sudo cp ${USERNAME}Key.pem /etc/ipsec.d/private/
121+
sudo chmod -R go-rwx /etc/ipsec.d/private /etc/ipsec.d/certs
121122
```
122123

123124
1. Run the following command to take note of your hostname. You’ll use this value in the next step.
124125

125-
```
126+
```cli
126127
hostnamectl --static
127128
```
128129

@@ -136,7 +137,8 @@ This section walks you through the configuration using the strongSwan CLI.
136137
type=tunnel
137138
leftfirewall=yes
138139
left=%any
139-
leftcert=myclientcert.pem
140+
# Replace ${USERNAME}Cert.pem with the key filename inside /etc/ipsec.d/certs directory.
141+
leftcert=${USERNAME}Cert.pem
140142
leftauth=pubkey
141143
leftid=%client # use the hostname of your machine with % character prepended. Example: %client
142144
right= #Azure VPN gateway address. Example: azuregateway-xxx-xxx.vpn.azure.com
@@ -151,12 +153,11 @@ This section walks you through the configuration using the strongSwan CLI.
151153

152154
1. Add the secret values to **/etc/ipsec.secrets**.
153155

154-
The name of the p.12 file must match what you have used earlier.
155-
The password must also match the password chosen when generating the certificates.
156+
The name of the PEM file must match what you have used earlier as your client key file.
156157

157158
This is an example command to run on a machine which hostname is "client" and certificate password is "password"
158159
```cli
159-
: P12 client.p12 'password' # key filename inside /etc/ipsec.d/private directory
160+
: RSA ${USERNAME}Key.pem # Replace ${USERNAME}Key.pem with the key filename inside /etc/ipsec.d/private directory.
160161
```
161162

162163
1. Finally run the following commands:

0 commit comments

Comments
 (0)