≡ Menu

Linux Install tor and privoxy To Communicate Anonymously On the Internet

Question: How do I install Tor (The Onion Router) software under Debian / Ubuntu Linux? How do I communicate anonymously on the Internet? How do I anonymously browser the Internet so that I can avoid network surveillance that threatens personal freedom and privacy under Linux operating systems?

Answer: Onion routing is a system enabling its users to communicate anonymously on the Internet. You need to install following softwares:

[a] tor - a free software implementation of second-generation onion routing for Windows / Linux / UNIX computer systems.

[b] privoxy - a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data, managing HTTP cookies, controlling access, and removing ads, banners, pop-ups and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. Privoxy has application for both stand-alone systems and multi-user networks.

WARNING! These examples and faq is about anonymity and not about security. Tor can be easily used to see sensitive data by exit nodes. Do not mistake Tor's anonymity for security.

Install tor and privoxy

Type the following command as root user or use sudo command:
$ sudo apt-get install tor privoxy

Linux tor and privoxy configuration

By default tor listen on TCP port # 9050. Open /etc/privoxy/config file, enter:
$ sudo vi /etc/privoxy/config
Append / change following config directive to chain Privoxy and Tor, both running on the same system:

forward-socks4a   /      .

Save and close the file. Restart privoxy:
$ sudo /etc/init.d/privoxy restart

Sample privoxy config file

See man page for detailed information (above configuration is sufficient to get started with tor)

# Generally, this file goes in /etc/privoxy/config
forward-socks4a / .
confdir /etc/privoxy
logdir /var/log/privoxy
actionsfile standard
actionsfile default
actionsfile user
filterfile default.filter
debug   4096
debug   8192
user-manual /usr/share/doc/privoxy/user-manual
toggle  1
enable-remote-toggle 0
enable-edit-actions 0
enable-remote-http-toggle 0
buffer-limit 4096

Configure browser for tor

Open Firefox click on Edit > Preferences > Advance tab > Settings:

Fig.01: Tor with Firefox network settings

Fig.01: Tor with Firefox network settings

Set and 8118 as privoxy server IP and port number. Now Firefox is ready to use with Tor.

Firefox Torbutton plugin

You can also install Torbutton plugin, for best safety. Simply grab and install the Torbutton plugin, restart your Firefox, and you're all set to use Tor. From the project page:

Torbutton provides a button to securely and easily enable or disable the browser's use of Tor. It is currently the only addon that will safely manage your Tor browsing to prevent IP address leakage, cookie leakage, and general privacy attacks.

Further readings:

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 6 comments… add one }

  • bla November 13, 2008, 10:19 pm

    one word for ya

  • T June 19, 2009, 11:53 am

    Can someone please explain: “Tor can be easily used to see sensitive data by exit nodes”?

  • emc June 19, 2009, 12:53 pm


    In September 2007, Dan Egerstad, a Swedish security consultant, revealed that by operating and monitoring Tor exit nodes he had intercepted usernames and passwords for a large number of email accounts.[15] As Tor does not, and by design cannot, encrypt the traffic between an exit node and the target server, any exit node is in a position to capture any traffic passing through it which does not use end-to-end encryption, e.g. SSL. While this does not inherently violate the anonymity of the source, it affords added opportunities for data interception by self-selected third parties, greatly increasing the risk of exposure of sensitive data by users who are careless or who mistake Tor’s anonymity for security.

    See http://www.securityfocus.com/news/11447

  • T June 19, 2009, 3:27 pm

    Thank you kindly for the info

  • zubs December 4, 2009, 9:58 am

    if net is via proxy , username:password

  • JustinTime February 12, 2013, 7:26 pm

    Tor is slow as fackkk….. I would not recommend using Tor to anyone. Slows down your connected to a crawl. Worse than dialup. I tried and it was horrible. DO NOT Use this.

Leave a Comment