User Tools

Site Tools


networking:openvpn:openvpn-setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
networking:openvpn:openvpn-setup [2026/11/28 09:38] – [Create Client Certificate and Key Pair] oscarnetworking:openvpn:openvpn-setup [2026/11/28 10:08] (current) – [Deploy Certificates & Keys] oscar
Line 162: Line 162:
  
 === Sign client key === === Sign client key ===
-This will create a private key for the client and a certificate request file called myvpnclient.req. Then sign the request by running easyrsa with the sign-req option, followed by the request type and the common name. The request type can either be client or server, so for the OpenVPN server’s certificate request, be sure to use the server request type.+This will create a private key for the client and a certificate request file called myvpnclient.req. Then sign the request by running easyrsa with the sign-req option, followed by the request type and the common name. The request type can either be client or server, so for the OpenVPN client certificate request, be sure to use the client request type.
 <code> <code>
-$ /usr/share/easy-rsa/easyrsa sign-req server myvpnclient+$ /usr/share/easy-rsa/easyrsa sign-req client myvpnclient 
 +--------------------------------------------------------- 
 + 
 +Notice 
 +------ 
 +Certificate created at: 
 +* /tmp/certs/pki/issued/myvpnclient.crt
 </code> </code>
 In the output, you’ll be asked to verify that the request comes from a trusted source. Type yes and press ENTER to confirm this.  In the output, you’ll be asked to verify that the request comes from a trusted source. Type yes and press ENTER to confirm this. 
 This will: This will:
   * Reads the request from //pki/reqs/myvpnclient.req//.   * Reads the request from //pki/reqs/myvpnclient.req//.
-  * Applies the server profile/extension set, marking the resulting certificate for server authentication (and typically setting EKU attributes appropriate for a TLS/VPN server rather than a client).+  * Applies the client profile/extension set, marking the resulting certificate for client authentication (and typically setting EKU attributes appropriate for a TLS/VPN server rather than a client).
   * Signs with the CA using your CA private key and CA certificate (//pki/ca.crt//), producing the signed server certificate at //pki/issued/myvpnclient.crt//. (Easy-RSA usually prompts you to confirm the request details and enter your CA passphrase, if one is set.)   * Signs with the CA using your CA private key and CA certificate (//pki/ca.crt//), producing the signed server certificate at //pki/issued/myvpnclient.crt//. (Easy-RSA usually prompts you to confirm the request details and enter your CA passphrase, if one is set.)
  
Line 181: Line 187:
 |ca.key |key signing machine only |Root CA key |YES| |ca.key |key signing machine only |Root CA key |YES|
 |dh2048.pem |server only |Diffie Hellman parameters |NO| |dh2048.pem |server only |Diffie Hellman parameters |NO|
-|MyServerName.crt |server only |Server Certificate |NO| +|myvpnserver.crt |server only |Server Certificate |NO| 
-|MyServerName.key |server only |Server Key |YES| +|myvpnserver.key |server only |Server Key |YES| 
-|MyClientName.crt |client1 only |Client1 Certificate |NO| +|myvpnclient.crt |client1 only |Client1 Certificate |NO| 
-|MyClientName.key |client1 only |Client1 Key |YES|+|myvpnclient.key |client1 only |Client1 Key |YES|
  
 === Server Deployment === === Server Deployment ===
Line 200: Line 206:
  
   - **ca.cert** --> insert contents --> between the <ca></ca>. Including the "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines.   - **ca.cert** --> insert contents --> between the <ca></ca>. Including the "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines.
-  - **MyClientName.key** --> insert contents --> between the <key></key>. Including the "-----BEGIN PRIVATE KEY-----" and "-----END PRIVATE KEY-----" lines. +  - **myvpnclient.key** --> insert contents --> between the <key></key>. Including the "-----BEGIN PRIVATE KEY-----" and "-----END PRIVATE KEY-----" lines. 
-  - **MyClientName.crt** --> insert contents --> between the <cert></cert>. Including everything.+  - **myvpnclient.crt** --> insert contents --> between the <cert></cert>. Including everything.
   - **ta.key** --> insert contents --> between the <tls-auth></tls-auth>. Including everything.   - **ta.key** --> insert contents --> between the <tls-auth></tls-auth>. Including everything.
  
networking/openvpn/openvpn-setup.1795858737.txt.gz · Last modified: by oscar