Hello. When trying to setup a working openvpn server on a dragino shield I found it a fairly complicated process. After much experimenting (literally days) and finally getting it to work I decided to write a script file to help me automate the process in the future. With this script it takes me about 15 minutes starting from nothing to a working openvpn server. In case this would help anyone I have attached the script. I apologize for not documenting the code very well - I ran out of time. Use at your own risk! I accept no responsibility should you damage your hardware or setup. To use it:
- I use winSCP and put the file in the /etc directory of the Yun.
- Set property of file to executable, can be done with winSCP or PuTTY - [chmod 700 makeOvpn.sh]
- From PuTTY execute it by typing ./makeOvpn.sh
- It will install or update the openvpn / easy-rsa files.
- then it will walk you through creating the server.conf file, all the keys and finally allow you to create multiple client files.
- You will need to copy any client files you make to your client(s) I use winSCP for this. NOTE: the client files need to be kept secret.
I have tested it using a dragino shield attached to both a Mega2560 and a Due with openvpn connect client software installed on several android platforms. I found using a 1024 key it worked perfectly every time. Using a 2048 key is hit and miss. I have not lived long enough to get it to work with a 4096 key. Maybe someone could figure that out.
makeOvpn.h (11.6 KB)