Tuesday, 17 July 2007

A quick way to fire up OpenVPN on your Nokia N800

Here's a nice shortcut to start OpenVPN once you've got it installed, because life is too short to type endless commands into an N800. Basically, it uses a very simple shell script.

It assumes you've already installed becomeroot; if you haven't then go and install it straight away. It's simply the way to become root these days and everyone is using it.
Darling.

The shell script itself is this:

#!/bin/sh
/etc/openvpn/openvpn --config n800remote.ovpn

NOTE: if your OpenVPN config file is called something other than n800remote.ovpn then you will obviously need to edit this script to reflect that.


So:

1. Download the script, called vpn, to the documents folder on your N800:

vpn

2. Transfer the file vpn to the /usr/bin/ folder on your N800 by starting up an Xterm window and typing
cd /home/user/MyDocs/.documents/
then
mv vpn /usr/bin/


3. Lastly, make sure the vpn script is executable by typing:
cd /usr/bin/
chmod 755 vpn

(You shouldn't need to do this step, but it doesn't hurt and it's good to get in to the habit.)

4. That's it! Now all you need to do to start OpenVPN is start an xterm window and become root by typing:

sudo gainroot

Then, from the # prompt, type

vpn

and OpenVPN will start up.

All thanks to the wonders of shell scripting! You Linux god, you.

Actually there are other, more efficient ways of doing this, but I just like scripting.

3 comments:

Anonymous said...

Thank you, this was very helpful. Using the previous entry and this one, with a few minor changes for wrong directories, I was able to get openvpn running on my N800.

Anonymous said...

I've managed to get openvpn running with your previous post using openvpn paackage for OS2008. However, when I try to follow your directions for the above, I always get 'permission denied' when I try typing in 'vpn' at #. I don't know what I'm doing wrong. I have the becomeroot package and definitely am doing it with root access. Again, I'm running OS 2008.

Sinisa said...

Not sure if this will work for you, but all I did was to create .conf file in /etc/openvpn, and it "automagicaly" starts on every boot, and whenever I have connection to Internet, I can access my network @ work.

If only I could make "Internet Call" through it to my asterisk server :( but tcpdump says that SIP is using address assigned to wlan adapter, even if sending to tun adapter, which is very stange...

 
© Copyright 2007-2008