STEP 1: Download Netkit, UML kernel and the filesystem

First you need a working Netkit. Download the following three files:

  • Netkit core version 2.4 and documentation

  • UML linux kernel (Don't worry, these are NOT replacements for your kernel, only the VM uses it!

  • UML filesystem with Tor already installed. The file system (180 Mb compressed ) is based on the Netkit filesystem version 3.0 alpha. There are two versions of the filesystem, one with the most recent stable version of Tor, the other contains both the experimental version and the SVN version of the code. Choose one and proceed:
    1. download FS with Tor (
    2. download FS with Tor experimental ( and Tor SVN snapshot. You can change between the two modifying trunk/lab-tor/parameters:

Note 1: it is easy to change the filesystem, e.g. update Tor or install other packages, programs. For instructions, see TorLabInstallFs

Note 2: both files are also mirrored here

STEP 2: Install Netkit

Use the steps below for a quick start.


tar -xjf netkit-2.4.tar.bz2
tar -xjf netkit-kernel-K2.3.tar.bz2
tar -xjf netkit-fs-F3.0a-tor*.tar.bz2

Set environment variables:

export NETKIT_HOME=`pwd`/netkit2

Note: you should add these environmet variables to your startup files! e.g. to ~/.bash_profile . Replace pwd with the right directory there!

Check whether install was fine:

cd netkit2; ./; cd ..

STEP 3: Download TorLab

svn co

STEP 4: Start the Netkit lab

Netkit creates files in the directory where it is run:

  • a log for each VM
  • a copy-on-write version of the filesystem for each VM

The latter one seems to be large, but actually it does not take up space!

We start the lab with the following options:

  • -p0: parallel startup of unlimited VMs
  • -o -M20: give 20 Mb of memory to each VM.
cd trunk/lab-tor
lclean && lstart -p0 -o -M20 

Note: "lclean" deletes the copy-on-write filesystems from the previous run. Otherwise, when you restart the lab, Tor cache files would be in the filesystem of each VM. If this is what you want, just do the "lstart" without the "lclean".

To restart, do

lcrash && lclean && lstart -p0 -o -M20

Note: "lcrash" stops all VMs immediately. It is not nice to crash a VM, because its own copy of the filesysyem can get corrupted. Since we delete these copies anyway (lclean), we don't care. You can use "lhalt" if you have more time.

STEP 5: Test Tor through SOCKS

An easy way to establish Tor connections is to use the "connect" program

Connect is alrady installed in the filesystem, so you can run it directly from the VM as:

connect -d -S 22
Last modified 10 years ago Last modified on Oct 20, 2008, 4:15:22 PM