You are here

Installing and setting up Tor & Privoxy in Kubuntu & Firefox

Submitted by Druss on Mon, 2007-09-03 19:17

Tor is an open source project that allows users to utilise the Internet anonymously through the use of something along the lines of distributed proxies - the Onion router network. Privoxy is more of a local web proxy that, when configured correctly, can protect your privacy by filtering such information at the source. Together they are an effective and user-friendly (but not necessarily perfect) solution to preserving your anonymity on the Internet.

Ubuntu, Kubuntu and other flavours of this popular distro, provide packages for both these programs. However, additional steps are required to set up and configure them. The following is a guide to do just that.

  1. First up, install Tor and Privoxy using your favourite package manager. On the command line, typing
    sudo apt-get install tor privoxy
    should suffice.
  2. Tor itself, should work fine out of the box. What's necessary is to configure Privoxy. While you can attempt to do this via Konqueror and Kate, it is a lot easier to accomplish (and explain tambiƩn) this via the command line.
    • Open Konsole.
    • Navigate to the privoxy configuration directory:
      cd /etc/privoxy
    • Make a copy of the default config file to save you some work if you screw up:
      sudo cp config config.default
      sudo is required as these are writeable only by root.
    • Edit the file using an editor:
      sudo nano config
      It might be useful to read some of this stuff, or you can just go right to the end of the file (or to section 5.2. forward-socks4 and forward-socks4a if you're picky.
    • Type the following here:
      # [Jubal]
      # Forward stuff to Tor.
      forward-socks4a             /    .
      # Add exceptions for the local network.
      forward                     10.*.*.*/     .
      # [/Jubal]

      The lines prefixed with # are comments and explain the following line and are self-explanatory. The 10.*.*.* indicates my LAN which should never go through Tor and should always be allowed. If you don't have a LAN, you can ditch this line. I use the [Jubal] [/Jubal] lines to indicate that these are my custom changes.
    • If you want to let other PCs on your network use this box as a Tor proxy server, also add the following line:
      where is the IP address of this box and 8118 is the port to listen to. This IP and port number pair can will be the settings to enter in the browser proxy configuration settings page on other PCs in your network.
    • Save this file and exit the editor.
    • Restart Privoxy (or just restart your PC) to activate the new settings.
  3. Now that Tor and Privoxy are configured, we next need to configure Firefox to use them. You can configure any browser to use them, but Firefox is my browser of choice and comes with a handy extension to accomplish this.
  4. In Firefox, navigate to and install the Tor button extension.
  5. Restart Firefox and visit Tor check to test if your browser is using the Tor network or not. The page will also tell you if other components of your browser can be used to compromise your privacy, and how. If you're really anally concerned about your privacy, you can attempt to solve these issues too, but most fixes for these will impede your browsing experience.

N.B. Privoxy, by default logs all your accesses in /var/log/privoxy. While this is useful initially, it can become overly large or a privacy risk on its own. To turn off logging, comment out (by prefixing with a #) the line logfile logfile in section 2.5. logfile of the Privoxy config file and restart Privoxy.


One thing you might want to note is that when javascript is turned on, tor will give warnings on almost every page you visit, sometimes up to 3 times in a row.
Turn it off to remove warnings, or edit the preferences in the tor button.

Thanks for the help.