wiki:TorLabInstall

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

http://www.netkit.org/download/netkit/netkit-2.4.tar.bz2

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

http://www.netkit.org/download/netkit-kernel/netkit-kernel-K2.3.tar.bz2

  • 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 (0.1.2.18): http://dit.unitn.it/~kiraly/netkit-fs-F3.0a-tor1.tar.bz2
    2. download FS with Tor experimental (0.2.0.9-alpha) and Tor SVN snapshot. You can change between the two modifying trunk/lab-tor/parameters: http://dit.unitn.it/~kiraly/netkit-fs-F3.0a-tor2svn.tar.bz2

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 http://aquila.netgroup.uniroma2.it/~saverio/tor-netkit/

STEP 2: Install Netkit

Use the steps below for a quick start.

Unzip:

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
export MANPATH=$MANPATH:$NETKIT_HOME/man
export PATH=$NETKIT_HOME/bin:$PATH

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; ./check_configuration.sh; cd ..

STEP 3: Download TorLab

svn co https://minerva.netgroup.uniroma2.it/svn/discreet/torlab/trunk

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

http://www.meadowy.org/~gotoh/projects/connect

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

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