HowTo: Setup RaspberryPi with OpenVPN Client
I recently set up a VPN Server on an EasyBox 904 xDSL. After that i wanted to connect my Raspberry Pi to it. Since it was not in my local network I registered an free Dyndns at selfhost.eu. Of course i had to enter this data in the EasyBox Updater.
I also downloaded the Certificate and the OpenVPN Credentials from the EasyBox. So the Files i had were:
rootca.crt (not sure if necessary)
Ok, now I show you how I installed and configured OpenVPN Client on my Raspberry Pi. Just to be sure update+upgrade. In case you didn’t know. Update is for refreshing the package list. Upgrade checks if there are old packages installed on your system and updates them.
sudo apt-get update && sudo apt-get upgrade
Next command will install openvpn.
sudo apt-get install openvpn
Now you have to copy the files (.ovpn, .p12, crt) to /etc/openvpn/
I normally use Cyberduck (Mac) or WinSCP (Win) for copy files to my raspberry pi via ssh. So i drop them in /home/pi/ and move them with: sudo mv /home/pi/filename.end /etc/openvpn/
Now load the vpn profile:
sudo openvpn johnsmith.ovpn
Please check if ifconfig shows tap0 with IP. For me the IP for tap0 was missing. To solve this issue enter:
sudo dhclient tap0
If you would like to connect automatically on startup. Edit this file with your vpn profile:
Sometime your client fails to load .ovpn ! Just rename it to .conf !