OpenVPN Adding Client Keys

openvpn

I have OpenVPN set up and working fine, however I want to add a new client key to it. Going off of the documentation, I issued the following commands with the following output on a CentOS box.

$ cd /etc/openvpn/easy-rsa
$ source ./vars
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/easy-rsa/keys
$ ./pkitool client-new
Please edit the vars script to reflect your configuration,
then source it with "source ./vars".
Next, to start with a fresh PKI configuration and to delete any
previous certificates and keys, run "./clean-all".
Finally, you can run this tool (pkitool) to build certificates/keys.

It also says the same thing if I try the command ./build-key client-new. Any idea on why I can't do that? I need to keep all of my other keys, I just need one more. Thanks for the help.

Best Answer

try

. ./vars

that loads the variables that are in the vars file.

I don't know why, if someone could explain why. I thought ./vars would just run all commands in the script, including the exports, so they would be in your env. Anywhay, putting an extra . in front of the command works for me.