May 3, 2011

New control opportunities

Just wanted to share a little proof of concept of Sinatra + Websockets + Applescript for browser based UI to anything on your Mac.

You need to


sudo gem install thin em-websocket sinatra rb-appscript

or something like that. Then you probably need to have iTunes running, but given these you should be able to run this ruby script, go to http://localhost:5000 in your browser and search for your iTunes music.
I used the well rounded appscript tools to figure out how to control iTunes.

Posted by Claus at 11:28 PM | Comments (0)

March 3, 2011

Leaving perl

So, I was reviewing one of my happiest perl-hacks, the Roskilde band finder, and due to a combination of perl line noise and my own inadequate design I simply failed at extending the hack like I wanted to. That's not what your goto quickfixer tool is supposed to offer you, and so I was disappointed and it felt like I lost some ability right there, as perl refused to be friendly to the task at hand.
I was a bit dismayed, because I have after all done a lot of nice little things with perl, and more so, because of the convenience of habit I have after a decade of perl scripts. I've moved a lot of my scripting to ruby, but ruby fails at delivering the level of brevity I have in perl. Or, ruby used to at least. Lately I've been rethinking that point of view. For sure, I'd rather write Eventmachine servers than POE servers. ActiveRecord outside of Rails isn't so bad. And I just discovered mashup-artist HTTParty. Decide on a "one file only" web framework* and I'm pretty much there.

I still need a couple of niceties** - but I think some DSLy goodness fixes most of what I'm missing. But I'm going to start migrating the Roskilde tool and I'll let you know what it ends up looking like.

* I think just Sinatra with erb will do fine.
** Something that does AWK inside ruby, basically - perl is what does AWK inside perl all on its own.

Posted by Claus at 1:52 PM | Comments (0)

September 25, 2010

Undgå mobilnyhedssites på din laptop

Man kommer let til at sidde fast på mobiludgaven af avisernes nyhedssites, hvis folk har sendt links til dem fra iphones eller androids, og det er pisseirriterende.
Greasemonkey to the rescue: Rigtige Nyheder kan du installere i din browser (i chrome uden videre - eller i firefox, hvis du har installeret greasemonkey) og så kommer du automatisk over til den "rigtige" udgave af historien.

Posted by Claus at 10:34 AM | Comments (0)

July 10, 2010

Adding a full double rainbow alarm to your Android phone

The first thing I thought when I saw Double Rainbow Guy in action was that I really needed this for my alarm clock. Scouring the Internet, I found instructions on how to add new alarm sounds to an android phone: Simply create the directory


/system/media/audio/alarms

on the SD card of your phone, if it's missing, and add an MP3 there. I extracted Yosemite Bear's audio the quick and dirty way, using Wiretap Studio, and now I can't wait for monday morning to come around so I can enjoy A FULL DOUBLE RAINBOW bright and early in the morning to start off the day.

You can get the audio here.

Posted by Claus at 3:32 PM | Comments (0)

July 17, 2009

Creating websites with builtin APIs

Whether or not its RESTian kosher I don't know, but the live Apollo 11 transcript is built natively around a JSON API. If you don't like mine - feel free to make your own.

Details: The API is at


http://www.classy.dk/cgi-bin/apollo_transcript.pl?q=transcript&jsonp=somejsonp_prefix

- note the jsonp parameter, which lets you call the api from JQuery and similar libraries without cross site worries. Don't need JSONP. Don't know what it is? just use

http://www.classy.dk/cgi-bin/apollo_transcript.pl?q=transcript

instead. If your javascript api needs the parameter, the doc will explain how to use it.
The output is quite simple: There's a 'now' parameter indicating server time (seconds since unix epoch), time of liftoff in same terms and notes from the log. The item 'current' is the latest transcript item before now. The item 'future' a list of the next events to occur.
The format of the events is an array with four elements: time, an id for the speaker, the actual text and a text representation of the time - relative to 'now'
If you build something using this script, please be conservative in how frequently you call the API - the future item gives you an idea of when it makes sense to call.

If something is unclear just view source on http://classy.dk/moon - which explains in source how to use it with JQuery, and gives tables describing the IDs of speakers.


This way of building websites: Presentation with HTML+CSS+JQuery and a pure API backend really appeals to me. Clearly there are fallback concerns for non-modern browsers etc. etc. but the separation of concerns is appealing - as is the instant availability of an API for other's to use.

Posted by Claus at 3:05 PM | Comments (0)

July 1, 2009

Getting to the Flash developers

It worked wonders for the ARToolkit to be connected to the Flash developer community. Maybe it will work for Arduino and hardware hacking as well - using the Netlab toolkit.

Posted by Claus at 4:49 PM | Comments (0)

June 10, 2009

Plugging the holes in the free Mac video toolchain

It must be a money making scheme - but iMovie won't eat Quicktime video for editing. Annoying way to make money is all I'm saying - fortunately there's an easy workaround: iSquint will compress and convert to MPEG4 - which iMovie will gladly handle. Obvious caveats on quality and compression rates apply.

Posted by Claus at 11:21 PM | Comments (0)

May 18, 2009

Demo Dag - vil du være med?

Har du lavet noget der (næsten) virker, så kom og vis det - eller kom og se på de andres ting.
(English? Summary at end of post.)

Første gang: 9/6 kl 20:00. Sted: Egmont, Vognmagergade 11 (kom præcis, så vi kan lukke jer ind)

(location: Egmont HQ, Vognmagergade 11, Kbh K. Be there sharp at 8PM - we need to traverse access control. )
Sign up here (or by leaving a comment on the post)

Jeg ved ikke af at der findes en begivenhed med følgende plan i København: Man møder op med sin dims. Noget man har lavet. Noget der virker*. Man har 15 minutter til at vise det frem og så er der fem minutter til snak. Så er det næste projekt. 5-6 projekter per aften og så en ølpause Demoer er 7 minutter lange, med mulighed for dommerens overtid. Diskussion i pausen og bagefter. Tænk pecha kucha, bare uden slideshows.

Vil du være med til at lave en? Jeg kan ikke se nogen grund til begrænsninger af hvad projektet kan være - web, visuelt, auditivt, mekanisk, elektronisk, til køkkenet, søfarten eller soveværelset - udover nogle grundregler:


  • Det virker - det er ikke konceptdag, men demodag.

  • Don't tell us - show us Vi vil hellere se hvad den kan, end hvad du lavede den af.

  • Ellers ingen grænser Intet er for stort og intet for småt. Kom med dit million-dollar produkt eller din hjemmestrikkede, ørkenhærdede, touch-enablede pandekageopskriftlæser.

  • Gem dine slideshows, servicekoncepter og forretningsplaner til en anden aften

Datoen er ikke skrevet i sten. Jeg foreslår tirsdag som en god ugedag - fordi torsdage og fredage for ofte er optaget.
Læg en kommentar hvis du er interesseret. Skriv om du gerne vil se på, eller om du har noget i skufferne du gerne vil vise frem.

English Summary Want to participate in a (software or hardware) demo day in Copenhagen? June 9th. Only running code. Demos are 7 minutes (with negotiable slack) Other than that hardware or software, woodware or anyware, web or desktop, mobile or stationary - anything goes. Leave a comment if you're interested. Include whether you've got stuff to show or want to look.


* Om det er lavet af træ, chips, papir eller bits er op til dig. Det skal være lavet. (næsten) af dig. Man skal kunne demoe det. DET VIRKER er de magiske ord, der åbner døren op. Tvivlstilfælde afgøres af Deres ærbødige overdommer.

Posted by Claus at 11:27 PM | Comments (29)

April 8, 2009

Tethering, Android, Firefox

Tetherbot is handy for quick and dirty internet access through your Android phone. It's not full on tethering - since you don't get a network interface - but having a Socks proxy works out fine in a pinch.
The only thing about it that isn't absolutely obvious is that proxying does no good if you don't have DNS. Firefox does not, by default, proxy DNS requests over SOCKS even if you set it up to use a SOCKS proxy (would be intelligent to do so, when the regular network interface is down, but there you are).
To make this work you need to open a tab to about:config and find the network.proxy.socks_remote_dns setting and set it to true. You should set your socks proxy to be a SOCKS5 proxy btw.
That's all - now Firefox is proxied, and that's good enough for me. Almost everything I need can in turn be reached via the browser.

(exception is SSH, but that's easy to fix. Follow the "port bouncer" instructions for Tetherbot).

Posted by Claus at 4:44 PM | Comments (0)

March 15, 2009

Using any Windows Printer on Mac OS X by way of VMWare Fusion

Short Version: If your Windows printer is not a postscript printer, use this trick to make a virtual postscript printer from your Windows printer. Then make sure your VM'ed Windows has printer sharing allowed on the firewall, and set up the printer as a network printer on Mac. You might need this guide to do that.

VMWare Fusion just saved me the money to buy a new printer. I was already very happy with VMWare Fusion, since my switch from XP to Mac. Using Fusion I was able to convert my XP machine to a virtual machine on the Mac, so I have lost no functionality at all - now I just have all the convenience of both operating systems. And I get to keep my C# and Visual Studio skills alive even though I'm on a Mac.
One problem, though, was printing.
A while back I bought an HP Laserjet 1018 from Morten, he couldn't use it because it's a Windows printer and he had switched to Mac. I had forgotten all about that, when I switched, so now his problem was mine.
There are some tricks around the net requiring firmware uploads to the printer - and if you turn it off you need to do it again (I think, the instructions were too complicated for my liking). Simply sharing it from my VM seemed better. The only problem, of course, was that it still had no Mac-happy drivers.
Ghostscript thankfully comes with a complete recipe for using any system printer as a Postscript printer (see above). Using this, and circumventing some broken printer discovery in Leopards Windows printer setup (also above) I now have a Postscript printer on Mac OS X which is really a Windows only HP.

The amount of indirection involved here is quite staggering: The physical printer, connects physically by USB to my Mac. The USB interface is virtualized inside my VM, inside which the printer is virtualized once more as a postscript printer. This virtual, virtual printer I can then connect to from the Mac and the deed is done.

Don't have a Windows license? I think this trick could be made to work with Linux as well - there are Linux drivers for this printer, and the rest of the toolchain also runs on Linux. VMWare Player + some hackery could be a Windowless way out (for this particular printer).

Posted by Claus at 12:40 AM | Comments (0)

February 4, 2009

Inputs available at Classy Labs

A quick rundown of the various physical interfaces I have for sensing information from the real world

  • Arduino kit sensors
  • Google Android (camera+accelerometer+compass+gps+touchscreen+buttons+trackball)
  • Wiimotes (accelerometer+buttons+IR-dots)
  • Wacom tablet (x,y,inclination X, inclination Y, button)
  • Mouse
  • Keyboard
  • Webcam

In short: Lots. I am going to build a compendium of how to talk to these things from environments I care about, which are mainly Processing, Puredata and then some previously nonexistent time series glue that I might have to write on my own.

Posted by Claus at 9:44 PM | Comments (0)

October 15, 2008

Adobe AIR really rocks

To convert the Spotify DJ from a little fun personal hack to something real it was clear that I needed some "consumer grade" way to install the DJing client on the machines of would be DJs.
"Some way" turned out to be Adobe AIR. Adobe AIR can be used with Flash, Flex or just plain old web skills - html and Javascript.
No matter which route you go you end up compiling a one file deliverable that installs as a real desktop application on the system.

I have had no exposure to Adobe AIR prior to today - but armed with online tutorials I started out at around 6 PM and at around 11 PM I was done - with time for UI tweaking and a little webserver work required to make the app work.

Adobe AIR quite simply brings web speed to the desktop. And its a pleasure to work with too. The runtime is a browser, so everything just works. I like JQuery - and of course I can just plug that in.
I haven't done things "properly" - haven't signed properly, haven't used the upgrading framework and so on, but the fact that I can make a useful UI that interacts with the file system and a web server in 4-5 hours is astounding. And it deploys as a 65k file.

Posted by Claus at 12:23 AM | Comments (0)

October 13, 2008

Introducing the Spotify DJ v. 0.01 0.0.20.0.3

[UPDATE: Morten tells me the config is the same on a mac, so I rewrote the script so it should also run on a Mac with perl installed]

[UPDATE II: The player is here! I can now remote DJ with Spotify!]

Inspired by Morten's suggestion for a DJing feature in Spotify and by the source code for Scrobblify, the Last.fm hack for Spotify, I decided to have a go at making just the feature Morten requested as a hack.
I started looking at the config-files for Spotify, found a file that is continuously updated with the track currently playing. It took a little figuring out to convert the internal hexadecimal ID to the Base62 encoded IDs used in the URLs but I figured it out and here it is - the very first rudimentary Spotify Auto-DJ for Windows.
I am running a version of this perl script which subscribes to file change notifications for the config file with the "now playing" track ID and then submits the latest track to this web server.
You can always find the current track I'm playing here or listen right away here. The web player automatically loads new tracks when I start listening to them.

Posted by Claus at 10:25 PM | Comments (4)

July 5, 2008

4$ Sensor bar


I recently bought a couple of Wiimotes for physical interface experiments at the lab. To make the most of it you need some IR light source for the camera to look at. The simplest thing one can do is light some candles - they show up fine. However, they flickr and are annoying to move around, and you can't turn them upside down. I found some Infrared LEDs that run fine on just a 1.5V button cell battery, and since I have no soldering skills I made a silly looking, but fully functional sensor bar replacement with some tinfoil and clothepins.

Posted by Claus at 5:36 PM | Comments (0)

May 3, 2008

Idea: Interfaceblocker

Just had a brilliant idea for a browser plugin: Interfaceblocker. It should work just like Adblock - but for the parts of a too busy web interface you just never use.
Does it already exist? What says the lazyweb?

Posted by Claus at 9:17 AM | Comments (0)

April 15, 2008

OpenID provider for Google Accounts on Google App Engine

I was wondering how quickly this would happen.

Posted by Claus at 6:43 AM | Comments (1)

February 28, 2008

Comments

Smart "conditional compilation" commenting tip for C++ style languages:


foo();
/*
bar();
baz.foo = 200;
return{
dolly:clone()
}
// */

The trick is the // before the closing */. With this you can just add another slash before the opening one and uncomment the block this way.

foo();
//*
bar();
baz.foo = 200;
return{
dolly:clone()
}
// */

Posted by Claus at 11:01 AM | Comments (0)

February 9, 2008

More CSS pseudo-class hacks

Very clever: Using colorchanges generated by the CSS :visited pseudo-class lets you test the client for previous visits to specific URLs.

Posted by Claus at 5:59 PM | Comments (0)

January 25, 2008

Images that scale with the text

Neat trick: SVG image that scales along with the font as you change the size.

Posted by Claus at 2:02 AM | Comments (0)

January 19, 2008

Totally awesome cheap 3D with Wii-sensors

We need more hacks like this!

We need more cheap peripherals that enables stuff like this. Just plain sensors with good SDKs and sample apps.

Posted by Claus at 2:49 PM | Comments (0)

October 23, 2007

Simple complete backups with VMWare

There are tons of backup utilities. I was recently looking for something very, very simple however, with great potential, so I'm now backing up my laptop with VMWare. I use VMWare Converter to generate an image of my laptop on an external USB disk and access the backup image using VMWare Disk Mount Utility. Both of these tools are free to use without purchase.
There's the added potential with Converter of going virtual for good. I didn't just ghost the disk, I created a virtual machine image of my physical machine. I'm running Windows XP on my Thinkpad and was seriously considering going Linux and running XP virtualized for eternity. The virtual Windows machine needs to reregister my Windows license - and I haven't tried that yet, so can't tell you if that is going to cause me administrative problems or not - but the backup solution is nice enough and really, really simple - essentially one-click.

I'm sure there are tons of ghosting tools out there, but the potential to just run the VMWare image directly is so appealing.

Posted by Claus at 3:27 AM | Comments (2)

September 24, 2007

Dealing with Skitch envy

I needed a simplifed way to do the kind of rapid imagesharing Mac-fans are doing with Skitch, but I don't have a Mac. What I do have is Windows, perl and imagemagick - so I wrote grab, a really simple script. It takes a bitmap image from the clipboard, converts it to a PNG, and copies the filename of the PNG to the clipboard, so it's easy to upload to your blog/image sharing service.
For cropping I just "Windows-key+R mspaint" and use the cropping tool and Ctrl-C - but I used to have this really nice tray app that could crop and clip in one go. I forgot the name, maybe Morten remembers.

Posted by Claus at 9:43 PM | Comments (0)

August 6, 2007

Totalt sikkerhedsmodelsammenbrud

Dan Kaminsky's black hat presentation this year is downright scary, using well known 10 year old design oversights in browser security models he is able to get complete access through a firewall with a garden variety browser. No immediate cure in sight that doesn't break a lot of good stuff.

Posted by Claus at 8:27 AM | Comments (0)

July 26, 2007

The iPhone is thorougly hacked

Somebody already figured out how to run an SSH server on the iPhone - and how to compile std unix tools for the phone as well. App=Website no more.

Posted by Claus at 2:07 PM | Comments (0)

June 25, 2007

Too bad the word Twitter is taken

Whistle while you work.

Posted by Claus at 6:13 PM | Comments (0)

June 21, 2007

All of Denmark covered by 100$ wifi router

One has to guess extra antennas were involved - and no forests or other natural antennae in the way - but the lowly and standard Linksys WRT54 router was recently used in an experiment able to transmit WiFi over a 382 km distance.

Posted by Claus at 12:42 AM | Comments (0)

June 15, 2007

How to switch off the broken ruby readline on Windows

It took me > 2 hours to remember this from machine A to new machine B just recently so here goes:

Ruby on Windows ships (many versions, any way) with a broken readline used in irb and rails console sessions. The upshot of the broken readline is that the characters { [ ] } and | are not available - which makes it kind of hard to use blocks...
The trick is this:
In your .irbrc file in c:\Documents and Settings\Your Name (make one if it isnt there) put the single line

IRB.conf[:USE_READLINE] = false

and your console sessions should become more satisfying

[
UPDATE: Hmm - through the unbelivable idiocy of the ruby distro on windows, ruby actually does NOT read this .irbrc on its own, and I haven't found a solid default interpretation of ~ or HOME or HOMEPATH elsewhere on win32 ruby either
You have to
set IRBRC=c:\Documents and Settings\Your Name\.irbrc
No, placing it with the ruby interpreter itself doesn't help either
]

Posted by Claus at 3:58 PM | Comments (0)

June 7, 2007

LOLCode

LOLCode lets you hack in absurd ALL CAPSy LOLCats glory. The code samples are great.

Posted by Claus at 1:12 AM | Comments (0)

April 26, 2007

The simplest way to local webservices

Running Mongrel as a service has to be the simplest route to very capable local webservices I have seen so far. (For simplest "But I don't even have development tools" route, try InstantRails and SciTE for editing).
The Mongrel Win32 FAQ is incorrect on the start and stop steps though - the plugin does not expose start stop methods, instead just


net start servicename
net stop servicename

I would love for something this simple to exist for perl CGI scripts but I can't think a any drop in solutions. Can you?

Posted by Claus at 2:30 PM | Comments (0)

February 16, 2007

Mapping the CapsLock key to the Windows key

This is essential on a small format Thinkpad. Use SharpKeys for convenience.

Posted by Claus at 10:44 AM | Comments (0)

February 2, 2007

Vista hacks...

Funny stuff: If you switch on voice control in Windows Vista and leave your speakers on, it's possible for websites you visit to control you PC by simply talking to the Vista voice control over the speakers. It's obvious - but the problem is already fixed in the pre-vista OS, Mac OS X which requires a special keyword before commands, because this exploit is so obvious (a passable sound for words that will shut down Vista will be common on websites shortly, I assume).

Posted by Claus at 1:26 AM | Comments (0)

January 23, 2007

Disabling Snap Previews

Thank god, there's a way to disable the Snap previews people have started to use. I imagine some people actually like that they can no longer scan over text with the mouse without obscuring it with pop-ups, but I personally don't. To the credit of Snap they provide an easy opt-out. Visit this link and mouse freely again.

Posted by Claus at 7:29 PM | Comments (0)

October 18, 2006

Forward link operator on MS Live Search

Microsoft has added forward link search to Live Search. Unfortunately it is pretty useless, because you can only search for links from a domain, not a particular URL, and in fact by domain I mean second level domain, e.g. classy.dk but not www.classy.dk. So if your site is in the UK (where domains for sale are all subdomains of co.uk) you're just out of luck. I have a hard time coming up with a good reason for this restriction. It pretty much kills the usefulness of the feature, which would otherwise have given me the tag hack for free.

Posted by Claus at 1:03 AM | Comments (0)

September 4, 2006

Sam Ruby's meme hack

I'm totally digging Sam Ruby's personal recommendation engine. It shows off trends I believe will only increase in proportion - specifically that data density and remix density is important and that the future of clock cycles is to run pattern recognition algorithms.

That the purpose of the hack is to bring the world closer to one of my own personal goals is just an added bonus.

Posted by Claus at 4:27 PM | Comments (1)

August 24, 2006

Lovefilm survival kit

Det tidligere Digitarian, nu Lovefilm, er supersmart - undtagen søgeinterfacet. Det er langsomt og besværligt og kedeligt og de anbefalinger der kommer frem for film er bare ikke fede. Godt man har Greasemonkey!. Ved at bearbejde Jon Udells biblioteksscript har jeg modificeret Amazon så man på hvert enkelt filmopslag kan se om filmen kan lejes på Lovefilm. Hent Greasemonkey. Hent scriptet. Installér. Se effekten her.

(tech note til greasemonkey hackere: Manage userscripts|Edit er din ven når du debugger)

Posted by Claus at 10:16 PM | Comments (0)

August 17, 2006

Controlling your Mindstorms NXT robot with bluetooth on Windows

I just got my Mindstorms robot and obviously had to start working on controlling the robot remotely. This is just some notes and a "hole in the wall" test.

Setting up bluetooth devices sucks - "setting up" anything does - but here's the mnemonic route for a sequence of actions that work.


  • Turn on the NXT bluetooth radio and make it discoverable
  • Add a bluetooth device (Win XP SP2 required, control panel, bluetooth settings)
  • Enter a passkey on windows
  • Wait for the passkey popup on the NXT and enter the same passkey there
  • Wait for much too long

Note: I found the connection setup brittle if I also used bluetooth from the program editor.

I used the perl scripts here (These ruby scripts might work for you).

Use the configuration program to update the serial port configuration for your system. COM7, the default setting, should work unless you have a ton of devices. Look for the "outgoing" Com port for the NXT.
wrt to the perl scripts above, add the line
$data = "\x00\x09\x00\x02a\x00";
to send a single letter 'a' to the NXT mailbox no 1 (zero based here, third byte is mailbox). Reading messages from a mailbox is how the visual programming environment can interact with the mindstorms robot.
I had limited success with the preset commands included in the perl script. Of all the commands in the Bluetooth SDK I only got the "PLAYTONE" direct command to work and then the more important one, which is the messagewrite above.
Note: Speed is not a feature of this communication channel.

I wrote a simple program to test: It checks the BT mailbox for a string 'a' - if it finds one it takes a quick roll back and forth. It's worth mentioning that you can't send messages to a mailbox unless a program is running - it's not enough that the NXT is turned on.

I then added a CGI wrapper around the perl script, exposed it temporarily on this webserver and had a world controllable robot. Next project: Sensor output back on the web.

Visual programming environment alert: The Labview derived visual programming environment seems buggy to me. I had to do 2 tries in generating a test program, because the first program just wasn't picking up the scanner input. I tested with the ultrasonic sensor that it wasn't buggy Bluetooth. I then reassembled the exact same program - and that worked. I got a clue when I shut down the editor and got an error message that my program had an "insane object " something or other. Very kid-friendly, that.

My test robot is here (286kb). (dig that filezise btw, that's completely insane for what the program does).

Posted by Claus at 1:50 AM | Comments (0)

July 20, 2006

OpenVPN tunneling over SSH

The classy.dk kitchen server sits behind an ADSL router provided by my ISP. That router is sensibly almost closed with only FTP, HTTP, SMTP and DNS ports open by defaut and none of these mapped to NATted addreses that are assigned by default through DHCP on the router. I'm fine with that even if it is stupid ISP control of my actions - less security threats to worry about, and I can actually turn on windows on new machines without being owned by virus after 5 seconds.
The only server I have setup to listen to inbound traffic is the old warhorse classy.dk web server (and yes it is in fact located in my kitchen like it says on the blog.
Occasionally I'd like to access resources on other machines on the net though and that just blows. The problem is that the other machines sometimes run windows and most certainly shouldn't be listening to network traffic. I could use SSH tunneling via the webserver and then a terminal emulator to look at the hidden machines, but that's just annoying. I want full access with file browsing. The works.
A real VPN is needed but which one, how to set it up and how to pass it through an interface on the webserver?
Here's a way: OpenVPN with SSH tunneling.
Since I'm not talking more than one machine at a time I can just use the simple point to point setup with a static key. I want to modify the howto to work through an SSH tunnel.


  1. Modify the server vpn configuration file by adding proto tcp-server
  2. Start the VPN server
  3. Modify the client by changing the first line to remote localhost and adding the line proto tcp-client
  4. Tunnel your local port 1194 (what OpenVPN uses) to 1194 on the machine you want to access - via the web server hosting the SSH daemon:
    ssh -L1194:vpnserver:1194 user@webserver
  5. Start the VPN client

That's it. Great stuff I've been looking for. Now I can drop files to and from servers at home that are safely stashed away out of reach it the wild and dangerous internets.

Posted by Claus at 12:10 AM | Comments (9)