I found a similar thread, but it still doesn't fix my issue.(OpenVPN Source vars not working on debian)
I was setting up OpenVPN according to https://help.ubuntu.com/14.04/serverguide/openvpn.html
and there was a problem when I tried to create my certificate according to the following guide:
cd /etc/openvpn/easy-rsa/ ## move to the easy-rsa directory
sudo chown -R root:admin . ## make this directory writable by the system administrators
source ./vars ## execute your new vars file
./clean-all ## Setup the easy-rsa directory (Deletes all keys)
./build-dh ## takes a while consider backgrounding
./pkitool --initca ## creates ca cert and key
./pkitool --server server ## creates a server cert and key
cd keys
openvpn --genkey --secret ta.key ## Build a TLS key
cp server.crt server.key ca.crt dh1024.pem ta.key ../../
when I try:
source ./vars
the shell gives me back:
NOTE: If you run ./clean-all, I will be doing a rm -r on /etc/openvpv/easy-rsa/keys
I ignored it and tried the next line:
sudo ./clean-all
it then says:
Please source the vars script first (i.e. "source ./vars")
Make sure you have edited it to reflect your configuration
I searched in google and stackoverflow, failed to resolve the problem.
Thanks for your help
Could anyone help me?
sudo su
to log in as rooteasy-rsa/2.0/
)mkdir keys
source ./vars
./clean-all
type
./build-ca
all the same commands as before but having created the keys directory and actually being logged in as root, instead of running it with sudo seemed to do the trick
Taken from here: http://ubuntuforums.org/showthread.php?t=801135