OpenVPN on Android/Galaxy Tab 7
- Category: Android
- Published on 09 November 2011
In the last days I was in need to connect to the company network to do "some regulations" (... like Garrus ;) ), and my OpenVPN connection was not working. I tried from my HD2 and I had no problems, so I did my job from there (complaining about having the smaller screen), repromising to myself that as soon as possible I'll had to fix it. Today was time to do, but it was not so easy as I though.
Linux ifconfig failed: could not execute external program.
OpenVPN wasn't able to run ifconfig. It took me a while and some googling to figure out I had to choose different path in OpenVPN installer. First /etc/xbins, then /etc/xbin again (NOT /etc/xbins/bb). After that I faced a new error. Using OpenVPN settings I checked the first checkbox on the top, OpenVPN. It runs:
Then I checked one of my VPNs configuration. It asked me user and password (it's a roadwarrior one), then...
Fatal: cannot allocate TUN/TAP dev dynamically
I thought that finally was everything ok, but I was wrong. I passed the auth process, but then I wasn't able to allocate TUN/TAP dev dynamically. Umpf. I had to open a term on the Galaxy Tab and run:
But the path on my installation was different. In my installation was /system/lib/modules/18.104.22.168/tun.ko, so I changed the insmod to:
It finally worked. But before closing everything, modify /data/local/userscript.sh (or whatever else you like, just ne sure it is executed at boot) to run the insmod (so you'll avoid to open term and write "insmod /system/lib/modules/22.214.171.124/tun.ko" every time you need to rise a VPN after switching on your device).
That's all. Happy OpenVPN!
Notes (April, 3rd 2012)
To use OpenVPN on your Galaxy Tab 7 you NEED a rooted tablet, and BusyBox installed on it. Otherwise it will never work. I suggest, instead of rooting the stock ROM (with that hugly wooden background everywhere and all the Samsung junk loaded on it) to flash CyanogenMod 7. See this article about flashing CM7 on your Samsung Galaxy Tab 7.