How to setup openvpn on linux using existing certificates

I have a windows laptop with openvpn client installed and configured to connect to the company vpn using a signed certificate / certificate authority file.

Now I'm setting up VMware Workstation with a Debian guest VM for development use which also needs to connect to the same VPN.

Can I use the same cert / CA files that I use on my windows host or do I need to generate new certificates? If so, then where fdo I put them and where does the config file go?

I've installed openvpn client on the Debian guest but the folder structure in linux is quite different to how it is in windows and I can't find any instructions anywhere.

Thanks in advance.


The same cert can be used, as long as only one connection is initiated. For Debian and most Linux distros, all files must be placed in /etc/openvpn. Place the ".key", ".crt". "ca.crt" and if your configuration specifies "ta.key", make sure you palce it there as well.

In WIN, the configuration file for your connection has the extension ".ovpn", while for debian should be renamed to ".conf"

mv ConnectionName.ovpn ConnectionName.conf

Place this file in /etc/openvpn

You will have the following files in /etc/openvpn:

ClientName.key
ClientName.crt
ca.crt
ta.key
ConnectionName.conf

If you want to have the VPN connection start at boot, uncomment AUTOSTART="all" in /etc/default/openvon

In VMware Virtual Network setting, make sure your network card is in promiscuous mode


Can I use the same cert / CA files that I use on my windows host or do I need to generate new certificates?

Sure, you can.

If so, then where do I put them and where does the config file go?

Put all the CA file, private key, config file into any directory you want and connect to VPN server with:

$ cd /directory
$ sudo openvpn <file.ovpn>