How to run a Tor relay on Ubuntu

credit to: 


Here is a quick how-to for setting up a Tor relay on Ubuntu or Debian Linux!

1. First, add the tor repository:

$ sudo nano /etc/apt/sources.list

Add a line as follows, changing the distro name to your current distro.

deb lucid main

2. Next add the gpg keys as follows with these commands:

$ gpg --keyserver --recv 886DDD89

$ gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

3. Next:

$ sudo apt-get update

This keeps the tor project key updated:

$ sudo apt-get install

And finally install tor:

$ sudo apt-get install tor

4. Upon installing tor, it starts immediately. First stop tor so we can make some changes.

$ sudo /etc/init.d/tor stop

Edit the tor config file:

$ sudo nano /etc/tor/torrc

Uncomment and set the following options in that config file:

ORPort 9001

Address yourpublicipaddress

Nickname pickagoodnickname

RelayBandwidthRate 100 KB  # Throttle traffic to 100KB/s (800Kbps)
RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)

ExitPolicy reject *:* # no exits allowed

You may wish to increase or decrease the bandwidth settings as desired.

5. Now that the file has been saved, start tor with:

$ sudo /etc/init.d/tor start

Open up port 9001 in ufw:

$ sudo ufw allow 9001

And finally tail the tor log to make sure all looks ok:

$ tail -f /var/log/tor/log

Note that it can take an hour or so for the relay node to be published.


Posted in Tips and Tricks

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Rodel Sales is a freelance I.T Professional . Start blogging on May 2013 to share my technical skills to other I.T professionals, and collect imperative guide from the internet world.
Blog Archieve
May 2013
    Jun »
%d bloggers like this: