Setting up an OpenVPN connection on Raspberry Pi.
The following instructions go step by step through the creation process of an OpenVPN connection on Raspberry Pi using Wheezy Raspbian O/S. The If you have any problems with this connection type we strongly recommend using a DD-WRT connection or Smart DNS.
We will assume that each command are entered as the user ‘root’. If you don’t have password for root, you can do this with your current user, but prepending each command with ‘sudo’, e.g: sudo /etc/init.d/openvpn restart
1. First you need to update the current list of packages:
2. You need to install the openvpn daemon:
apt-get install openvpn
3. You now need a copy of our tcp/udp configs, which you can get from our control panel or click here downoload them directly from our server. You should copy them to the pi (via scp, for example), and unzip them into /etc/openvpn.
4. Choose whichever type of connection you will use – tcp or udp. Copy the necessary files from config subdir into /etc/openvpn:
cp config/* .
mv udp.ovpn vpnuk.conf
5. Edit the config and change the name of the server. You can change the port, too, if needed, to one of the ports we support (1194, 55194 or 65194 for UDP or 443, 80 or 8008 for TCP).
6. After the auth-user-pass, enter a filename, e.g. ‘user.txt’.
Save the config, and exit to the shell.
7. Create a file with your username and password in it on two different rows, e.g.:
root@raspberrypi:/etc/openvpn# cat user.txt
8. Protect the file:
chmod go-rwx user.txt
9. Restart openvpn:
10. Thats It! You should be up and running.