5,603,981 Members 44,444 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] OpenVPN for Dummies

Tip us?
 
sc10000
Old
(Last edited by sc10000; 25th December 2010 at 07:13 PM.)
#1  
Member - OP
Thanks Meter 6
Posts: 46
Join Date: Aug 2007
Post [GUIDE] OpenVPN for Dummies

Thanks to all the developers who put the bits & pieces together; without them it wouldn't be possible. You don't need to be an Android or Linux guru to get it working - SDK, ADB, etc. are not required.



What is OpenVPN?

OpenVPN is a free and open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses SSL/TLS security for encryption and is capable of traversing network address translators (NATs) and firewalls.


What's Covered in this Guide:

A step by step tutorial for configuring OpenVPN on the Evo 4G. Use at your own risk!


Not Covered:

Yea but how do I?


Requirements:

Rooted Evo

USB Data Cable

Amon RA Recovery - RA-evo-v1.8.0 (or above)
http://files.androidspin.com/downloa...evo-v1.8.0.img

Terminal Emulator (download from market)

Super Manager (download from market)

Busybox (download from market)

OpenVPN Installer (download from market)

OpenVPN Settings (download from market)

Tun.ko built for your specific kernel (recommend netarchy-toastmod, Stable: 4.1.9.1 or higher)
http://forum.xda-developers.com/show...highlight=amon

Modified openvpn executable & matching iproute-wrapper script.
http://forum.xda-developers.com/atta...9&d=1282516002

An OpenVPN Account & config files.

GTech Net Tools (download from market).



Let's begin.


Root your Evo if not already done.

Install GTech Net Tools & run; select My IP & Get IP Address; External Address & Local Information are issued from your cell provider data network; record these values for later comparison.

Install Amon RA.

Install Busybox to /system/xbin.

Install OpenVPN Installer (binaries) to /system/xbin; select path to ifconfig: /system/xbin.

Install OpenVPN Settings (settings later in this guide).

Install custom kernel with built in tun.ko support; flash via Amon RA recovery & reboot.

Install Terminal Emulator.

Install Super Manager.

Open your openvpn config file & add the following to the last line, then save: 'iproute /system/xbin/iproute-wrapper.sh'.

***Make sure your config.ovpn file has NO_SPACES in name***

Connect Evo to PC via USB cable; select 'Disk Drive' & 'Done'.

Create folders on SDCard 'Downloads' (if not already there), and 'openvpn'.

Copy your config.ovpn files to SDCard/openvpn folder

Copy 'openvpn' & 'iproute-wrapper.sh' to Downloads folder on SDCard.

Disconnect USB cable.

Start Super Manager; select Settings; Enable ROOT function; press back button on phone; browse to SDCard/Downloads - copy & paste 'openvpn' & 'iproute-wrapper.sh' to /system/xbin.

Start Terminal Emulator.

@ $, type su & enter key; should now see #

Type 'chmod 755 /system/xbin/openvpn' & enter; then type 'exit' & enter.

Start Super Manager; select Settings; disable ROOT function.

Press Home button on phone.

Start OpenVPN Settings; press 'menu' button on phone; select 'advanced'; check 'load tun kernel module'.

Click 'TUN modules settings'; Check Load module using 'insmod'.

Enter Path to tun module: '/system/lib/modules/tun.ko'.

Select 'path to openvpn binary'; enter '/system/xbin/openvpn'.

Check 'Fix HTC Routes'.

Press Back button on phone.

Check OpenVPN; check your_server.ovpn; 'Username/Password required' should appear on Status bar at top of phone.

Slide Status bar down, click on 'Username/Password required', enter info & click 'OK'.

Under yourserver.ovpn view status - Wait for 'connecting...auth...get config'...should be 'connected to 111.111.111.111 as 222.222.222.222'.

Start GTech Net Tools; select My IP & Get IP Address; External Address & Local Information should now be issued from your OpenVPN provider; compare to original data you recorded earlier.

Press Home button on phone...do you see the 'Key' icon on Status bar?

If Yes.............You have done it!



Additional Resources:


OpenVPN

http://openvpn.net/

Wikipedia - OpenVPN

http://en.wikipedia.org/wiki/Openvpn



Enjoy!

The Following 2 Users Say Thank You to sc10000 For This Useful Post: [ Click to Expand ]
 
sc10000
Old
(Last edited by sc10000; 23rd December 2010 at 05:25 AM.)
#2  
Member - OP
Thanks Meter 6
Posts: 46
Join Date: Aug 2007
Check 1st post for revisions & updates.
 
sw99
Old
#3  
Senior Member
Thanks Meter 14
Posts: 230
Join Date: Jun 2010
Thanks for the write up. However, can you dumb it down one more level. I started looking at OpenVPN when I realized that the Android VPN was broken. I have configured Windows VPN for my home Windows PC, but I assume that it won't directly work with OpenVPN.

What do I need to do to configure my PC?

I assume once I understand that, I'll also understand what you mean by "An OpenVPN account & Config Files.

I appreciate your help.
 
sc10000
Old
(Last edited by sc10000; 25th December 2010 at 06:03 AM.)
#4  
Member - OP
Thanks Meter 6
Posts: 46
Join Date: Aug 2007
The guide is limited to OpenVPN on the Evo 4G Android platform.
 
1Brite1
Old
#5  
Senior Member
Thanks Meter 38
Posts: 214
Join Date: Jun 2010
I have a question also. I am stuck at the Open your openvpn config file & add the following to the last line, then save: 'iproute /system/xbin/iproute-wrapper.sh" step. Is this on the EVO or on the OpenVPN account?

Also, I signed up for the OpenVPN account and am using a Macbook-with Windows 7 installed via Parallels, an iMac and another laptop running Linux Ubuntu. Which program do I download for my setup on the OpenVPN site so that they all work? I don't see one for OSX? I have tried the EVOVPN app and it works great just for the phone....but computers won't hook up even though I have them set up using the same LAN settings.

I am hoping for something that will let me use a secure server using the EVO connecting all of my computers.

Thanks for your help and for the guide and for any advice you could share. Have a great day!
The Following User Says Thank You to 1Brite1 For This Useful Post: [ Click to Expand ]
 
sc10000
Old
(Last edited by sc10000; 28th December 2010 at 02:36 AM.)
#6  
Member - OP
Thanks Meter 6
Posts: 46
Join Date: Aug 2007
Good questions - focus on keeping things simple.

Quote:
Originally Posted by 1Brite1 View Post
I am stuck at the Open your openvpn config file & add the following to the last line, then save: 'iproute /system/xbin/iproute-wrapper.sh" step. Is this on the EVO or on the OpenVPN account?
Your OpenVPN provider posts config files to download required for their service to work. Normally no editing is necessary, but for Android it is at least for now (*more on why later).
Their config files package may include many different types of files, look for the one with .ovpn extension (there may be several - server_1.ovpn, server_2.ovpn, etc.); open the file(s) with your text editor; normally the last line of this file is 'auth-user-pass'; create a new last line 'iproute /system/xbin/iproute-wrapper.sh' (without quotation marks) and save. Copy this edited file & any other config files your provider requires to the Evo /sdcard/openvpn folder you created earlier.

Quote:
Originally Posted by 1Brite1 View Post
I signed up for the OpenVPN account and am using a Macbook-with Windows 7 installed via Parallels, an iMac and another laptop running Linux Ubuntu. Which program do I download for my setup on the OpenVPN site so that they all work? I don't see one for OSX? I have tried the EVOVPN app and it works great just for the phone....but computers won't hook up even though I have them set up using the same LAN settings.
The good news is whatever OpenVPN service provider you choose, it should work with whatever device you have. However, each operating system has different requirements, so there are clients specific to each of these OS's. For example, Windows client = openvpn client, Linux = gopenvpn, etc. For the Evo, & Android in general, the client is 'OpenVPN Settings', setup of which is included in the guide. 'EVOVPN' is not 'OpenVPN', we're not sure what it is, they don't offer any support or documentation; advise to stay away until more info is available.

Quote:
Originally Posted by 1Brite1 View Post
I am hoping for something that will let me use a secure server using the EVO connecting all of my computers.
As above, only one service provider is needed, the clients vary by operating system. If you're referring to remotely accessing your other computers via the Evo with OpenVPN running, well yes that works but is not covered here; setup for that would be the same whether or not you use OpenVPN.


*The edit to .ovpn config file is required at this time to let the Android client know which routing table is being used; it may become unnecessary with future updates.
The Following User Says Thank You to sc10000 For This Useful Post: [ Click to Expand ]
 
1Brite1
Old
#7  
Senior Member
Thanks Meter 38
Posts: 214
Join Date: Jun 2010
Thank you sc10000.....I appreciate your time...nothing more frustrating than asking a question and never getting an answer or one that is so informative. I will try the set-up again...but I see also that you have to pay for the OpenVPN service. I have an OpenDNS account and wonder if that is the same type of service and it is free but not sure if it will work with EVO. I will look into that option also as I know I used to use that for my Linux system. But, as you said, that may be just operating system specific. Again, thank you for elaborating!!! Now, I get it.
The Following User Says Thank You to 1Brite1 For This Useful Post: [ Click to Expand ]
 
realrasengan
Old
#8  
Junior Member
Thanks Meter 2
Posts: 4
Join Date: Dec 2010
Thanks for the tutorial sc10000. I just wanted to put a little bit of input into the mix.

OpenDNS is quite different from OpenVPN. OpenVPN is strictly for users who need to encrypt their connection and/or connect to another 'network' such as their work or school network. A lot of other people use OpenVPN for other reason (i.e., watch Hulu from another country outside of the US, etc.).

I use Private Internet Access ( privateinternetaccess.com ) as an OpenVPN provider and it works with your tutorial. Other great providers are listed here:

Private Internet Access ( privateinternetaccess.com )
WiTopia ( witopia.net )
Strong VPN ( strongvpn.com )

There are a few others, but I would stick to the big three for safety.
The Following 2 Users Say Thank You to realrasengan For This Useful Post: [ Click to Expand ]
 
sc10000
Old
(Last edited by sc10000; 28th December 2010 at 05:16 PM.)
#9  
Member - OP
Thanks Meter 6
Posts: 46
Join Date: Aug 2007
Some other great providers not listed above:

Anonyproz - anonyproz.com

blackvpn - blackvpn.com


There are many out there, find one that suits you.
The Following 2 Users Say Thank You to sc10000 For This Useful Post: [ Click to Expand ]
 
Gibby1310
Old
#10  
Member
Thanks Meter 2
Posts: 47
Join Date: Dec 2010
I keep getting
FATAL:Linux ip link set failed: could not execute external program

I checked the permissions on the files and they are executabled, I checked the iproute-wrapper.sh script and it was looking for ip in /system/bin my EVO did not have it there but it was in /system/xbin so I changed that too.

Tags
openvpn
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes