lebi
Posts: 4
Joined: Sun Jan 11, 2015 6:45 pm

VPN on Pi - problem with creating ovpn files

Thu Jun 14, 2018 11:26 pm

Hi,
first time I did this but following instruction on this page. everything went ok. when I get to a point I'm creating the client file I'm getting this

Code: Select all

 cp: cannot create regular file `/home//ovpns/pivpn-client1.ovpn': No such file or directory
chown: cannot access `/home//ovpns/pivpn-client1.ovpn': No such file or directory
and after that it states that it was created but in a path ->> /home//ovpns:

Code: Select all

Done! pivpn-client1.ovpn successfully created! 
pivpn-client1.ovpn was copied to:
  /home//ovpns
for easy transfer. Please use this profile only on one
device and create additional profiles for other devices.
Firstly I don't understand why the path has "/" and then "//" -> that doesn't make sense for me. Secondly when I looked into file system there is no such directory as well as the file with *.ovpn extension anywhere on my disk.

Any ideas how can I get this working please?


Below the whole code when I want to add a client:

Code: Select all

pi@raspberrypi ~ $ sudo pivpn add
cat: /etc/pivpn/INSTALL_USER: No such file or directory
Enter a Name for the Client:  pivpn-client1
Enter the password for the client:  
Enter the password again to verify:  
spawn ./easyrsa build-client-full pivpn-client1

Note: using Easy-RSA configuration from: ./vars
Generating a 2048 bit RSA private key
.....................+++
..........................................+++
writing new private key to '/etc/openvpn/easy-rsa/pki/private/pivpn-client1.key.B9r8jyAW88'
Enter PEM pass phrase: mojehaslo

Verifying - Enter PEM pass phrase: mojehaslo

-----
Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :PRINTABLE:'pivpn-client1'
Certificate is to be certified until Jun 11 22:32:18 2028 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated
spawn openssl rsa -in pki/private/pivpn-client1.key -aes128 -out pki/private/pivpn-client1.key
Enter pass phrase for pki/private/pivpn-client1.key: mojehaslo

writing RSA key
Enter PEM pass phrase: mojehaslo

Verifying - Enter PEM pass phrase:mojehaslo

Client's cert found: pivpn-client1.crt
Client's Private Key found: pivpn-client1.key
CA public Key found: ca.crt
tls-auth Private Key found: ta.key
cat: Default.txt: No such file or directory
cp: cannot create regular file `/home//ovpns/pivpn-client1.ovpn': No such file or directory
chown: cannot access `/home//ovpns/pivpn-client1.ovpn': No such file or directory


========================================================
Done! pivpn-client1.ovpn successfully created! 
pivpn-client1.ovpn was copied to:
  /home//ovpns
for easy transfer. Please use this profile only on one
device and create additional profiles for other devices.
========================================================

epoch1970
Posts: 1625
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: VPN on Pi - problem with creating ovpn files

Fri Jun 15, 2018 10:28 am

You probably installed incorrectly.
The script is missing the user name. It wasn't saved in /etc/pivpn/INSTALL_USER and it's missing throughout: paths like "/home//ovpns" should look like "/home/pi/ovpns".

I would remove /etc/pivpn and try reinstalling the script from scratch.

It could be a bug in that script, though. There is a github page I suppose you can contact the authors there.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

lebi
Posts: 4
Joined: Sun Jan 11, 2015 6:45 pm

Re: VPN on Pi - problem with creating ovpn files

Fri Jun 15, 2018 10:13 pm

that's what I did. raised an issue with them but thought it's possible to somehow edit a config file or something to overcome this. unfortunately I'm not fluent in linux so still need a step by step guide for such things.

Return to “Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot], DG415346, etam, gkreidl, The Traveler and 56 guests