Thanks,
been away on vacation for a week, but now I need to finish the new OpenVPN server configuration.
I think I have gotten the list of needed files now so I have copied them over from the source to the target unit using scp.
I hope these are OK (my server name is BBOpenVPN):
Code: Select all
sudo -s
cd /etc/openvpn
scp -p server.conf pi@192.168.0.146:/home/pi/openvpn/
cd easy-rsa/keys
scp -p BBOpenVPN.* ca.crt dh*.pem ta.key pi@192.168.0.146:/home/pi/openvpn/serverkeys/
scp -p *.ovpn pi@192.168.0.146:/home/pi/openvpn/userkeys/
This transferred the files into my new Raspberry Pi in the /home/pi/openvpn dir.
Code: Select all
/home/pi/openvpn:
-rw------- 1 pi pi 1436 May 8 00:39 server.conf
/home/pi/openvpn/serverkeys:
total 28
-rw------- 1 pi pi 4127 May 4 13:11 BBOpenVPN.crt
-rw------- 1 pi pi 733 May 4 13:10 BBOpenVPN.csr
-rw------- 1 pi pi 920 May 4 13:10 BBOpenVPN.key
-rw------- 1 pi pi 1383 May 4 13:09 ca.crt
-rw------- 1 pi pi 245 May 4 13:40 dh1024.pem
-rw------- 1 pi pi 636 May 4 13:57 ta.key
/home/pi/openvpn/userkeys:
total 24
-rw------- 1 pi pi 4752 May 4 19:40 BosseASUS.ovpn
-rw------- 1 pi pi 4752 May 4 19:40 BosseS4M.ovpn
-rw------- 1 pi pi 4740 May 4 19:39 BosseWin7.ovpn
Now I will have to move the server files to the correct place on the new server and here is where I am getting a bit confused...
Question #1:
The tutorial I follow describes how one
copies the easy-rsa example to etc:
Code: Select all
cp –r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/easy-rsa
Then a number of operations are performed by root at the target location to create certificates and keys, which I obviously will not need to do since I am
migrating the server.
But what I don't get is why an OpenVPN server would store its important key files in a location like /etc/openvpn/easy-rsa/keys.
Why not simply /etc/openvpn/keys??
And do I really need to copy the easy-rsa example files into /etc if I will not need to build new certificates and such?
Question #2:
In the tutorial there is also a command to enter this into the /etc/openvpn/easy-rsa/vars file:
Code: Select all
export EASY_RSA="/etc/openvpn/easy-rsa"
Is this needed in my case?
I want to keep the server installation as compact as possible, so if I can get away without copying the easy-rsa example I would also not like to create the vars file...
Ideally the new server would have a directory structure like this:
/etc/openvpn (contains the server.conf file)
/etc/openvpn/keys (contains the
needed key and certificate files)
And then nothing more.
Is this OK?
Question #3:
Is there a need for any
client files on the server?
I have noted that when I made the ovpn files there were also some other files created (name.crt, name.csr, name.key), do they need to be moved to the new server as well?
It seems like the client only needs the ovpn file to be able to connect.
But does the server need a corresponding file to match the connection with?