In spring of this year I created an OpenVPN server on a Raspberry Pi running RASPBIAN.
It worked OK but after a while I realized that it was not really good to have dual use of the Pi (it also runs XBMC media center) so I decided to buy a new Pi to host OpenVPN and this time running RASPBIAN.
I installed OpenVPN the same way I did on the first Pi except I did not create any certificates etc. Instead I duplicated the already existing server by copying over the needed certificates and such to effectively make a backup server.
#On source Pi:
sudo -s
cd /etc/openvpn/easy-rsa/keys
scp -p *.ovpn pi@192.168.0.1xx:/home/pi/openvpn/userkeys/
scp -p BBOpenVPN.* ca.crt dh*.pem ta.key pi@192.168.0.1xx:/home/pi/openvpn/serverkeys/
#On destination Pi:
cd /home/pi/openvpn
mkdir /etc/openvpn/keys
mv server.conf /etc/openvpn
cd serverkeys/
mv * /etc/openvpn/keys/
cd /etc/openvpn
chmod 600 keys
chmod 700 update-resolv-conf
This worked very good to and I redirected my Internet router port forwarding to this new server to get on-line.
Now I would like to add new logins to the server and I would like to know if there are some files or such that need to be transferred back to the original server in order for it to be a backup server still able to log in the new connections?
In fact I would like to know the steps to take to create a new set of logins on the active server and then to transfer the needed files to the backup server so both can handle the same users.
It was about 6 months since I did these installations and the logins were created as part of a step-by-step cook-book instruction I found on the web.
If I try to repeat the steps for client creation now I get error responses:
root@jenny-pi:/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
root@jenny-pi:/etc/openvpn/easy-rsa# ./build-key-pass JennyVPNBB
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.
root@jenny-pi:/etc/openvpn/easy-rsa#
It seems like there is something needed that I am missing now, but it was part of the original install or something else is wrong....
Notice that the message tells me to do ./source vars, but that is exactly what I did just above that command!
What could be wrong?