Running OpenVPN on your Motorola Droid 2.2

Running OpenVPN on your Motorola Droid 2.2

I have finally gotten OpenVPN working on my Motorola Droid. Here are a few short notes for anyone who is on a similar mission.

  • This method requires root access for which I used CyanogenMod 6.0. If your phone is not already rooted you will need to do this first (CyanogenMod or another ROM).
  • Since the TUN module was removed I had to switch to a different kernel. I choose the P3Droid 1250 2.2 low voltage (125Mhz) kernel using setCPU to manage my clock speeds. This kernel is important because it adds TUN support. I had no end of trouble trying to load the module myself with tun.ko and insmod which never ended up working any way.
  • Create some directories and symbolic links. To do this I ran adb remount; adb shell mkdir /system/xbin/bb; adb shell ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig; adb shell ln -s /system/xbin/route /system/xbin/bb/route from my host PC with the USB cable plugged into my Droid using the Android SDK. Note that I run Linux but if you are running Windows just run each command in between the semi-colons, one by one.
  • I ran OpenVPN Installer available in the Android Market. When asked make sure you answer /system/bin/, /system/xbin/bb.
  • Now you are ready to load up your OpenVPN-related stuff. Write a new configuration (named whatever.conf) and generate some new certificates for your new client. Stick them on your SD card in the openvpn directory.
  • Install OpenVPN Settings from the Android Market. Once opened it should now show the configuration file you stuck on your SD card. Just tap it and watch it connect.

You may want to tweak your configuration a bit to ping more often or the like to deal with the fact this is a cellular connection and it will be going up and down on a regular basis. Both TAP and TUN adapters worked great in my tests.

If any of this seems confusing or you do not understand what a line does you should not be doing any of this. A lot of these commands– if done in the wrong context, at the wrong time, in the wrong order, or if your chi is off– will brick your phone and your warranty will be voided. Hell, your warranty will be voided if everything goes right. Beware!

One thought on “Running OpenVPN on your Motorola Droid 2.2

  1. Hi Nick,

    My name is Ananjan Chaudhuri and I work for Packt Publishing, a U.K. based publishing firm specializing in focused IT books. You can read more about us here: http://www.packtpub.com/

    I came across your blog through google search and noticed good amount of information on OpenVPN.

    I would like to inform you that Packt has recently published a new book OpenVPN 2 Cookbook, a new book which covers everything a system administrator needs to manage and run an OpenVPN network, from point to point networks to troubleshooting. Written by Jan Just Keijser, this book offers all the information you need to successfully manage your network. You may read more about the book here:- https://www.packtpub.com/openvpn-2-cookbook/book

    Keeping in mind your knowledge in this subject and having looked at your contributions, I feel you’d make an excellent reviewer of this book. In case you’d like to write a review on your blog/website and/or Amazon, simply let me know your shipping details (Required for the registration of new reviewers) and I’ll have the eBook added to your account and would provide you with the download instructions in my next e-mail. You can then download this book instantly.

    If you have any queries, do let me know and I’d be happy to assist.

    I look forward to hearing your thoughts on this.

    Have a good day!

    Ananjan.

Leave a Reply to Ananjan Chaudhuri Cancel reply

Your email address will not be published. Required fields are marked *