Running the Tor client on Linux/BSD/Unix


Note that these are the installation instructions for running a Tor client. If you want to configure it as a server (please do), read the Configuring a server guide.


Step One: Download and Install Tor


The latest release of Tor can be found on the download page. We have packages for Debian, Red Hat, Gentoo, *BSD, etc there too.

If you're building from source, first install libevent, and make sure you have openssl and zlib (including the -devel packages if applicable). Then Run tar xzf tor-0.1.0.14.tar.gz; cd tor-0.1.0.14. Then ./configure && make. Now you can run tor as src/or/tor, or you can run make install (as root if necessary) to install it into /usr/local/, and then you can start it just by running tor.

Tor comes configured as a client by default. It uses a built-in default configuration file, and most people won't need to change any of the settings. Tor is now installed.


Step Two: Install Privoxy for Web Browsing


After installing Tor, you need to configure your applications to use it.

The first step is to set up web browsing. Start by installing Privoxy: click on 'recent releases' and pick your favorite package or install from source. Privoxy is a filtering web proxy that integrates well with Tor.

You need to configure Privoxy to use Tor. Open Privoxy's "config" file (look in /etc/privoxy/ or /usr/local/etc/) and add the line
forward-socks4a / localhost:9050 .
to the top of the config file. Don't forget to add the dot at the end.

Privoxy keeps a log file of everything passed through it. In order to stop this you will need to comment out two lines by inserting a # before the line. The two lines are:
logfile logfile
and the line
jarfile jarfile

You'll need to restart Privoxy for the changes to take effect.


Step Three: Configure your applications to use Tor


After installing Tor and Privoxy, you need to configure your applications to use them. The first step is to set up web browsing.

If you're using Firefox (we recommend it), check out our Tor SwitchProxy howto to set up a plugin that makes it easy to switch between using Tor and using a direct connection.

Otherwise, you need to manually configure your browser to HTTP proxy at localhost port 8118. (That's where Privoxy listens.) In Mozilla, this is in Edit|Preferences|Advanced|Proxies. In Opera 7.5x it's Tools|Preferences|Network|Proxy servers. You should click the "use the same proxy server for all protocols" button; but see this note about Tor and ftp proxies.

Using privoxy is necessary because browsers leak your DNS requests when they use a SOCKS proxy directly, which is bad for your anonymity. Privoxy also removes certain dangerous headers from your web requests, and blocks obnoxious ad sites like Doubleclick.

To Torify other applications that support HTTP proxies, just point them at Privoxy (that is, localhost port 8118). To use SOCKS directly (for instant messaging, Jabber, IRC, etc), you can point your application directly at Tor (localhost port 9050), but see this FAQ entry for why this may be dangerous. For applications that support neither SOCKS nor HTTP, take a look at tsocks or socat.

For information on how to Torify other applications, check out the Torify HOWTO.


Step Four: Make sure it's working


ipid.shat.net and showmyip.com are sites that show what IP address and country you appear to be coming from.

If you don't know your current public IP address, this may not be a very useful test. To learn your IP address, run "ifconfig". If you are behind a NAT or firewall, though, you won't be able to learn your public IP address. In this case, you should 1) configure your browser to connect directly (that is, stop using Privoxy), 2) check your IP address with one of the sites above, 3) point your browser back to Privoxy, and 4) see whether your IP address has changed.

If you have a personal firewall that limits your computer's ability to connect to itself, be sure to allow connections from your local applications to local port 8118 and port 9050. If your firewall blocks outgoing connections, punch a hole so it can connect to at least TCP ports 80 and 443, and then see this FAQ entry.

If it's still not working, look at this FAQ entry for hints.


Step Five: Configure it as a server


The Tor network relies on volunteers to donate bandwidth. The more people who run servers, the faster the Tor network will be. If you have at least 20 kilobytes/s each way, please help out Tor by configuring your Tor to be a server too. We have many features that make Tor servers easy and convenient, including rate limiting for bandwidth, exit policies so you can limit your exposure to abuse complaints, and support for dynamic IP addresses.

Having servers in many different places on the Internet is what makes Tor users secure. You may also get stronger anonymity yourself, since remote sites can't know whether connections relayed through your computer originated at your computer or not.

Read more at our Configuring a server guide.


If you have suggestions for improving this document, please post them on our bugtracker in the website category. Thanks!

Webmaster - $Id$