- Jailbroken Iphone (I run 3.1.2 jailbroken using Blackrain)
- Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
- WinSCP (http://winscp.net/eng/download.php or something similar)
- OpenVPN certificates and openvpn configuration file (.ovpn). The certificate should not be password protected if you want to use this through SBSettings toggle. There is instructions to take the password off below. The .ovpn file should be renamed conf.ovpn and should also be pointing to the certificates without any path.
Step-by-Step instructions (Please run these as root by doing su root and entering your password)
- In Cydia: Install Openvpn toggle for SBSettings
- In your windows/mac assemble your certificate, .ovpn files etc into a local directory
- rename your .ovpn file to conf.ovpn and add the following two lines to the end of the file. Here is a sample ovpn file. You need to change the remote host, cert details to yours.
- download the update-resolv-conf
- Open a WinSCP session and copy all the files you assembled locally to /var/mobile/Library/OpenVpn
- In the winscp session edit the /var/mobile/Library/SBSettings/Commands/com.offinf.openvpnup and change as follows:
- Open Putty and login to your iphone as root.
- Reboot your phone for the sbsettings toggle changes to take effect
- After reboot, open SBSettings and turn on OpenVpn
"/usr/bin/openvpn-iphone --script-security 2 --config /var/mobile/Library/OpenVpn/conf.ovpn" &
$ cd /var/mobile/Library
$ chown -R mobile.mobile OpenVpn
$ cd OpenVpn
$ chmod +x update-resolv-conf
#### If you have a key with password. Remove the password with the command below.
#### You will be asked for the password one last time
#### Important: Leaving your certificate without a key is a security risk. Please turn on passcode lock in your settings
#### This will ensure that if your phone does fall into the wrong hands they cant get into your network.
$ cp my.key my.key.orig
$ openssl rsa -in my.key.orig -out my.key
#### Now test your vpn setup by doing the following:
$ openvpn-iphone --script-security 2 --config conf.ovpn
#### You should see it connecting to your vpn server and setting up routes. Try to use Safari to look at something
#### behind the openvpn server.
Note: For trouble shooting install top from cydia and run top to see if the toggle spawns the openvpn-ip process.