The Zerina (OpenVPN) addon for IPCop is an excellent VPN addon.  One thing it does for simplicity is the keys are compiled into a pkcs12 (*.P12) file, which contains the Certificate Authority, the Certificate, and the Key for authentication.  Which is great if you are wanting to drop it directly into OpenVPN GUI for Windows.  Its an easy setup.  However, I’ve been working on making my switch to Ubuntu Linux and the only way to use the P12 files is at the command line.  I needed an easier way to connect to the VPN’s so in comes network-manager-openvpn.


apt-get install network-manager-openvpn

After you install the openvpn addon for Network Manager you can click on the Network Manager icon on your task tray and select “VPN Connections” > “Configure VPN” where you can add your VPN connection.  The problem is that this does not [yet] support pkcs12 (*.P12) files. In comes openssl, You have to extract the p12 file into PEM format.


To extract the CA Certificate:
     openssl pkcs12 -in myvpn.p12 -cacerts -nokeys -out myvpnca.pem

To extract the Personal Certificate:
     openssl pkcs12 -in myvpn.p12 -clcerts -nokeys -out myvpncert.pem

To extract the Private Key:
     With a password: openssl pkcs12 -in mydccert.p12 -clcerts -nocerts -out myvpnkey.pem
     Without a password: openssl pkcs12 -in mydccert.p12 -clcerts -nocerts -nodes -out myvpnkey.pem

At this point we now have the three files required to setup our VPN connection in Network Manager. (see screenshot below)
Click on Add.
Select OpenVPN as the connection type and click Create.
Give you connection a name.
The gateway is the FQDN or IP address of your OpenVPN server.
Type is Certificates (TLS)
The user certficate is the myvpncert.pem file from earlier
The CA Certificate is the myvpnca.pem file from earlier
The Private Key is the myvpnkey.pem file from earlier, you may have to type in your password if you chose to have one.
OK.

I did not have to change any other settings for this to be able to work. Enjoy!