5.1.10.5. OpenVPN Certificates Configuration
In the 2SRA use case, the use of OpenVPN as a VPN service requires the use of certificates.
This section shows how to configure CA for OpenVPN.
5.1.10.5.1. Certificate Authorities (CA) configurations
Generating a CA
It is necessary to have a certificate to associate to the Ipsec tunnel that we are going to create in OpenVPN later on. If you already have a Public Key Infrastructure (PKI) you can use your own CA and the server certificates created with it.
If you do not have your own CA or prefer to use a new one, follow these steps:
Access the ON Core via SSH.
Download easy_rsa to /opt and unzip it:
cd /opt
wget -c https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v3.0.6.tgz
tar xvzf EasyRSA-unix-v3.0.6.tgz
Edit and configure the variables file with the data of your organization:
cd EasyRSA-v3.0.6/
cp vars.example vars && chmod +x vars
vim vars
Modify the following parameters accordingly with your organization:
Then you have to modify the expiration time of the CA and the certificates. You will need to uncomment the following lines and adapt the time according to your needs:
Having modified the default data, create your CA by following these steps:
Initialize the PKI environment:
Create your CA: You will need to protect your CA with a strong password (write it down, as it will be needed in the section “GENERATE A VPN SERVER CERTIFICATE USING THE CA”):
It will ask you to enter a password and then a Common Name. In this example the Common Name is VPRW_EMMA:
The CA will be available in the /opt/EasyRSA-v3.0.6/pki/ca.crt on the server. Copy it locally for later use.
scp root@<IP>:/opt/EasyRSA-v3.0.6/pki/ca.crt <LocalDirectory>
If you want to check that the certificate was created with the parameters used, use the following command:
openssl x509 -in /opt/EasyRSA-v3.0.6/pki/ca.crt -text -noout
5.1.10.5.2. Registering the CA in the VPNGW CMDB
Once you have created the CA, it must be registered in the backend so that it is available to the VPNGW.
For that, we go back to the Administration Portal > VPNGW > CMDB > Certificate Authorities.
Click on the Add new button and it will display the following window:
Click on Accept to load the CA.
You can also edit and delete certificates using the correspondent buttons located at the top row of this view.