How to set up VPN connection with .p12 and .ovpn file?
Solution 1
To complement @barbaz answer:
You need to convert the .p12 file to CA certificate, client certificate and client private key.
The command line commands for these actions are:
openssl pkcs12 -nocerts -in default.p12 -out userkey.pem
openssl pkcs12 -nokeys -clcerts -in default.p12 -out usercert.pem
openssl pkcs12 -nokeys -cacerts -in default.p12 -out userca.pem
It will ask for a password for your client private key, you write what you want there, and remember that password for later.
Then you choose the option 'Certificate (TLS)', and select the three files, and add the password you added in the command line.
Solution 2
If you are unfamiliar with openvpn, you might want to try using NetworkManager to configure it. Afaik there is a package called network-manager-openvpn
that will enable openvpn in your NetworkManager VPN section. The .p12
file should already contain the CA certificate, the client certificate and the client private key. If NetworkManager cannot use that file (but only accepts each of the three files individually in PEM format) you might need to convert your file.
If though you decide to run openvpn yourself as root, the configuration directive to use your file is
pkcs12 client.p12
as documented in openvpn(8)
.
Related videos on Youtube
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
I'm quite new to Linux (Ubuntu 10.10) and I'm having a hard time trying to import keys and certificates for a VPN connection to my work office server.
- I have a
.p12
file which is the key I'm guessing. - I also have a
.ovpn
file which could be the config settings for the connection.
How would I import these files to get a connection up and running?
Any instructions would be greatly appreciated.
- I have a
-
Valerio Bozz about 2 yearsIf the
.p12
works in command line without any password, but if the conversion saysMac verify error: invalid password?
, try adding-passin pass:
as openssl argument.