Openvpn client not connecting in raspberry pi
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 2
- Joined: Sun Apr 21, 2013 4:11 pm
Openvpn client not connecting in raspberry pi
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.
-
- OpenVPN Super User
- Posts: 219
- Joined: Mon Nov 23, 2009 8:24 pm
Re: Openvpn client not connecting in raspberry pi
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.
* 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.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue May 21, 2013 5:08 pm
Re: Openvpn client not connecting in raspberry pi
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
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
-
- OpenVPN Super User
- Posts: 219
- Joined: Mon Nov 23, 2009 8:24 pm
Re: Openvpn client not connecting in raspberry pi
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:
Also make sure openvpn is started automatically, as root check:
Please let me know.
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
Code: Select all
update-rc.d openvpn defaults
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue May 21, 2013 5:08 pm
Re: Openvpn client not connecting in raspberry pi
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.
Thanks.
-
- OpenVPN Super User
- Posts: 219
- Joined: Mon Nov 23, 2009 8:24 pm
Re: Openvpn client not connecting in raspberry pi
When you manually start openvpn, does it work? Please try:
And if not, can you post the logging here?
If that's not working, making openvpn autostart doesn't help either.
Code: Select all
sudo openvpn --verb 3 --config your-config-file.conf
If that's not working, making openvpn autostart doesn't help either.