Page 1 of 1
Openvpn client not connecting in raspberry pi
Posted: Sun Apr 21, 2013 4:56 pm
by serenityrox
I am having a problem with getting my raspberry pi to connect to my openvpn server. I have done that apt-get install openvpn, and then I created a directory to place my .ovpn files. I then run the script by doing sudo openvpn auto.ovpn. I have tried this with both locked, and auto login files. Neither are working. Please help!!!! Going crazy, and I am sure that it is something trivial. Thanks Any help would be greatly appreciated.
Re: Openvpn client not connecting in raspberry pi
Posted: Mon Apr 22, 2013 5:07 am
by mwandelaar
When installing openvpn on linux (assuming you are running the default Raspbian on your PI) you need to place the configfiles:
* in /etc/openvpn AND
* the extension needs to be .conf and not .ovpn
to be able to start automatically.
And, ofcourse, the path's to the key + certfiles needs te be full path's.
Hope this helps.
Re: Openvpn client not connecting in raspberry pi
Posted: Tue May 21, 2013 5:14 pm
by joubink
Hi mwandelaar,
After changing the extension and placing in the directory, what else do we need to do for it to start automatically? Also what do you mean by full paths?
Your help is much appreciated.
Thanks
Re: Openvpn client not connecting in raspberry pi
Posted: Tue May 28, 2013 7:43 am
by mwandelaar
Openvpn can start automatically at boot-time. To do this, openvpn expects one or more files in /etc/openvpn, where the name end in .conf
If they are there, the startup-script wil pass these configfiles to openvpn and openvpn starts using this configfile.
Reading in this configfile, openvpn needs to know where to find the private, certificate and ca-certificate. They will be somewhere on disk (sd-card in case of a Raspberry PI) so openvpn needs to know exactly where to find these files.
Therefore the configfiles needs to point to these files with there full path:
Code: Select all
ca /etc/openvpn/certs/cacert.pem
key /etc/openvpn/vcerts/private.key
cert /etc/openvpn/certs/cert.pem
Also make sure openvpn is started automatically, as root check:
Please let me know.
Re: Openvpn client not connecting in raspberry pi
Posted: Mon Jun 03, 2013 1:11 am
by joubink
Thanks so much. My config file already contains the private and the certificate parts. They are not in separate files. So it should work as is. If it doesn't I'll pass that on.
Thanks.
Re: Openvpn client not connecting in raspberry pi
Posted: Sat Jun 08, 2013 11:53 am
by mwandelaar
When you manually start openvpn, does it work? Please try:
Code: Select all
sudo openvpn --verb 3 --config your-config-file.conf
And if not, can you post the logging here?
If that's not working, making openvpn autostart doesn't help either.