How to set up Tor and Privoxy on Ubuntu Linux
Published September 18th, 2006 in TechnologyAbout Tor
Tor, an innovation of the Electronic Frontier Foundation, is a distributed network of virtual tunnels (you can think of it as a peer to peer network of proxy servers). Essentially data is transferred in encrypted form through multiple servers. It is very useful as a privacy measure because the data is encrypted and it’s very difficult to find the source of the data directly. It also comes in handy for getting around overly restrictive firewall policies (such as the Chinese government firewall, or the firewall my university campus network has) because it can be tunneled over any port you wish.
Overview [Tor]
About Privoxy
Privoxy is basically an HTTP proxy that has the additional feature of hiding all DNS requests. This is simply used on top of Tor to provide that additional layer of privacy (Tor behaves as a SOCKS 4 proxy, and as such browsers can leak requests if it’s used directly instead of going through Privoxy).
What you need
- A computer running Ubuntu 6.06 on which you have root privileges
- An internet connection
Installation
Open /etc/apt/sources.list as root in your favorite text editor, and add the following line to the end
# Tor
deb http://mirror.noreply.org/pub/tor dapper main
deb-src http://mirror.noreply.org/pub/tor dapper main
Then, open a terminal, and install the necessary components by executing the following commands:
sudo apt-get update
sudo apt-get install tor privoxy tsocks
Configure Privoxy to use Tor
Open /etc/privoxy/config as root in your favorite text editor, and add the following line to the top of the file (don’t forget the dot at the end of the line, it’s important):
forward-socks4a / localhost:9050 .
If you’re using Privoxy for privacy, you might also want to disable logging. To do that comment out the following lines in the file by putting a # before them:
logfile logfile
jarfile jarfile
Configure Tor’s ports to use HTTP/HTTPS (useful for getting through firewalls)
Add the following lines to /etc/tor/torrc
ReachableDirAddresses *:80
ReachableORAddresses *:443
Configure tsocks (for quick and easy tunneling of applications on the fly without configuring)
Edit /etc/tsocks.conf and edit the server lines at the bottom to look like this
server = 127.0.0.1
server_type = 4
server_port = 9050
Once you have done that, you can now use tsocks to start applications tunneled like so:
tsocks <command>
You can also start a tunneled subshell like this:
tsocks
Configuring individual applications for Tor
HTTP Proxy: localhost:9118 (this configuration is preferred for privacy but does not work for all applications).
SOCKS 4 Proxy: localhost:9050 (don’t use this if the above works due to the potential for DNS request leakage).
Alternatively, you can use tsocks to start applications that don’t support configuration (also can suffer from DNS leakage).
I hope you enjoyed this post!
This post was submitted to ProBlogger’s ‘how to’ writing project. Make sure to check it out and read the useful ‘how to’ posts others have written.
28 Responses to “How to set up Tor and Privoxy on Ubuntu Linux”
- 1 Pingback on Sep 19th, 2006 at 4:44 am
- 2 Pingback on Sep 22nd, 2006 at 8:31 pm
- 3 Pingback on Sep 23rd, 2006 at 2:00 am
- 4 Pingback on Sep 23rd, 2006 at 7:03 am
- 5 Pingback on Sep 23rd, 2006 at 8:53 am
- 6 Pingback on Sep 23rd, 2006 at 9:59 am
- 7 Pingback on Sep 25th, 2006 at 8:45 am
- 8 Pingback on Sep 26th, 2006 at 12:02 pm
- 9 Pingback on Sep 26th, 2006 at 12:12 pm
- 10 Pingback on Oct 1st, 2006 at 12:57 am
- 11 Trackback on Aug 20th, 2007 at 3:34 pm
Ubuntu rocks!!!!! I have a post on my blog about Ubuntu CE if you want to check it out at http://www.dipnoi.org/archives/category/technology/page/2/
Also, I contributed to the Group Writing Project as well, here is my post http://www.dipnoi.org/archives/category/salvation/
Keep up the good work
Oh, what fun. Now if I wasn’t stuck with this Mac….
Our list is up as well if you’d like to check it out!!
Wow, it’s like a foreign language to me! I love these writing projects because I see so many things I wouldn’t normally read, and it’s always neat to learn new things.
I wish I understood more about this stuff…I have a lot of learning to do, I guess.
(Found you through ProBlogger)
Didn’t work:
tor
Sep 27 10:55:28.395 [notice] Tor v0.1.0.16. This is experimental software. Do not rely on it for strong anonymity.
Sep 27 10:55:28.396 [warn] config_assign_line(): Unknown option ‘ReachableDirAddresses’. Failing.
Sep 27 10:55:28.396 [err] tor_init(): Reading config failed–see warnings above. For usage, try -h.
That’s an older version of tor. The instructions if followed should give you tor v0.1.1.23, which supports that directive. It was added in Tor 0.1.1.14-alpha, which you don’t have, so you probably should upgrade. If you don’t wish to do that, you could try replacing
ReachableDirAddresses *:80ReachableORAddresses *:443
with
FascistFirewall 1FirewallPorts 80,443
amazing!! it worked perfectly. thank you very much.
cheers
I’m glad you found it useful.
heyas all.
my 40 gig drive is going to good use now. I have installed UBUNTU and have ordered KUBUNTU.
I dont know how to install the driver for my ati radeon 9600xt.
Actually i dont know if i am meant to be downloading and installing XFREE86 or the XORG version of the driver. I am downloading them both but i dont know how to do anything in Linux really.
I dont know where I am meant to set up my modem or set up a net account. (no INETWIZ.EXE)
So yeah, can someone help me out with getting my ATI driver installed?
and does anyone know of a good long PDF file i can read and wrap my brain around.
I’m still a Windows user, but I want to use Linux as much as possible.
Thanks.
I think you need to install xorg-driver-fglrx and change the “Driver” line in /etc/X11/xorg.conf from “ati” to “fglrx”, then restart X. Not 100% sure though, I’d check over at http://ubuntuforums.org/ to make sure.
I am trying to install tor, i followed your instruction but I get:
Nov 01 00:39:24.076 [warn] /var/lib/tor is not owned by this user (debian-tor, 112) but by root (0). Perhaps you are running Tor as the wrong user?
Nov 01 00:39:24.076 [warn] Failed to parse/validate config: Couldn’t access/create private data directory “/var/lib/tor”
Nov 01 00:39:24.077 [err] tor_init(): Reading config failed–see warnings above. For usage, try -h.
invoke-rc.d: initscript tor, action “start” failed.
dpkg: errore processando tor (–configure):
il sottoprocesso post-installation script ha restituito un codice di errore 1
Sono occorsi degli errori processando:
tor
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don’t know if this is the problem or not, but it sounds like you’re not running apt-get as root. Did you prefix the 2 apt-get commands with sudo as listed in the guide? And, do you have privileges to sudo to root?
helo there…i’m having the same problem with you as my place administrator only allows us to download below that 2mb..it is crazy..i want to figure out how to solve this using torr..i’m using fedora right now..i will changed to ubuntu around this week as i want to try this and i hope corvillus can teach me how to make install this distro in portable(external) harddisk(i need to to this as i can easily go to another place then download some requiredment stuff about torr).Another one i heard there is revolution of torr which is TRUE..how about if i install Nubuntu(the latest distro from ubuntu family)..can you help me to figure out how to set my connection so that i can bypass my local administrator rules and download more than 2mb..really need help..this problem really freak me out..
~AlexanDer reEz~
i did all of above except
ReachableDirAddresses *:80
ReachableORAddresses *:443
But i have a question,
for example if i enter the command
tsocks curl http://www.whatismyip.com
or
tsocks nmap -sV -P0 http://www.somedomain.com
will there still be any DNS leakage?
Unfortunately, Tor will have DNS leakage if used on its own. You need to use Privoxy to prevent this.
Weekly Trend for the Week September 17th - 21st 2007
BSE Sensex: (15604)
Nifty (4518)
14. 09. 2007
Market is in stretched zone.Technically trendis still intact up but due to overstretched, correction is due. Technically market to come down now. Its being 2 week market has not shown any significance movement and is trading in sideway zone due to which there is no trending movement.
Trend is still up but minor correction can’t be ruled out. It will be correction first then again up move and market will remain volatile throughout.
The crucial support for the href=”http://www.sharetipsinfo.com/”title=”Sensex”>Sensex is at 15348 the resistance to the up move at 15868-16222
The crucial support for the href=”http://www.sharetipsinfo.com/”title=”NIFTY”>NIFTY is at 4444 the resistance to the up move at 4646-46700
Right now There are few scripts which are looking quite good from short term prespective. Buy them at declines .
Scripts are:-
1.PSTL
2.PENNINLAND
Please feel free to contact us
for any query.
Reagrds
SHARETIPSINFO
09891655316
09899056796
09891890425
“HTTP Proxy: localhost:9118 (this configuration is preferred for privacy but does not work for all applications).”
I thought the default was 8118?