Following this here page: http://lifeofpentester.blogspot.com/2013/04/using-tor-and-privoxy-on-kali-debian.html
We'll assume you're running Kali/Tails/Pentoo/Backtrack/know what you're doing...
What This Covers
This article covers how to browse the web anonymously by running web traffic through Privoxy and then through Tor for anonymizing (or, as close as you can get nowadays) our web traffic and location.
For an article covering the use of Privoxy and Tor on a battery-powered wireless router, see Widy/Anonymous Browsing
The first thing we'll install is Tor, a proxy server:
$ apt-get install tor torbrowser-launcher
Tor and Vidalia are the Stargate portal that will lead you into the .onion field of the Dark Web.
Now a couple of other tools mentioned on that page: the first is Privoxy, and the second is Polipo.
$ apt-get install privoxy # polipo
Privoxy is an HTTP proxy service. Polipo is another web proxy service.
How it works
Tor will run a proxy server on port 9050. The proxy type is Socks5 (https://en.wikipedia.org/wiki/SOCKS#SOCKS5). Socks is the name for a family of protocols for routing packets from clients to servers, and it's a common way to build proxy servers.
Privoxy runs a proxy server on port 8118. That proxy type is HTTP. This means Privoxy listens for web traffic on this port.
Before we start browsing, we'll connect our browser's HTTP traffic on port 80 to the Privoxy HTTP port on 8118. Then Privoxy will forward HTTP traffic on to the Tor proxy server on port 9050.
We will need to configure our browser to send traffic from port 80 to port 8118.
We will need to configure Privoxy to forward HTTP traffic from port 8118 into Socks5 traffic for the Tor proxy server on port 9050.
Remember, we're going to configure Privoxy to forward traffic to Tor.
$ vim /etc/privoxy/config
add the line:
forward-socks5 / localhost:9050
There is even an example in the configuration file that has precisely this line, so all you have to do is uncomment it.
Here, we'll use proxychains to manage the browser proxy.
Proxychains is a program that lets you run other programs through a proxy. So we can configure proxychains, and then run
proxychains iceweasel to run our browser through proxychains.
We've already configured privoxy to listen for HTTP on port 8118, and forward it as SOCKS5 to port 9050 (to Tor).
Now we will configure proxychains to forward traffic to port 8118. Edit the file
/etc/proxychains.conf and comment out the Tor line and add in the Privoxy line:
## tor #socks5 127.0.0.1 9050 # privoxy http 127.0.0.1 8118
There's no service to restart with proxychains, you just execute it when you need to execute a program through a proxy.
Fire Up Privoxy and Tor and Proxychained Iceweasel
Start up the Privoxy and Tor services:
$ /etc/init.d/tor start $ /etc/init.d/privoxy start
Now Privoxy is listening for HTTP traffic on port 8118, which it will forward as Socks5 traffic to port 9050, where Tor will take it from there.
Start up your proxychained Iceweasel, which will tunnel all your traffic through port 8118:
$ proxychains iceweasel