Tor (which stands for The Onion Router), is a powerful anonymity service originally developed by the US Navy, which helps protect citizens around the world from abuse and monitoring. A VPN also offers the same service, if you’re not familiar with the tool, you can read about the VPN meaning here.
Most people use Tor via the Tor Browser, which simplifies setup, and I encourage you to use that where you can. This article discusses going one step further, and routing all traffic through Tor via the use of a HTTP proxy.
In the UK, the passage of the disastrous #IPBill places everyone under suspicionless surveillance, and I have client confidentiality to consider. So, as a matter of due diligence, I wanted to ensure that when my ISP’s surveillance database was inevitably hacked, the information the Russian Mafia got was of limited use.
This was easy enough to set up.
Install and configure Tor
The first step is to install Tor; not the browser, but the software the browser talks to in order to make it’s connection. On Debian based systems, apt-get install tor
.
Tor comes with a SOCKS proxy, so enable support by editing /etc/tor/torrc
and uncomment the line:
SocksPort 9050
If this is a network server, you may want to enable an external proxy on your network as well (for example, I have an always on Raspberry Pi running a tor proxy for all the various iOS devices on my home network).
Chain a simple HTTP Proxy
Once that’s done, you’ll have a SOCKS proxy up and running that’ll route anything it gets through Tor. Many things (e.g. the aforementioned iOS devices) won’t talk SOCKS. To solve this, I use a light weight HTTP proxy called polipo
to create a HTTP proxy wrapper for Tor’s SOCKS proxy.
Install polipo: apt-get install polipo
Then configure the proxy to chain to Tor’s SOCKS proxy, modify /etc/polipo/config
:
... allowedClients = 127.0.0.1, 192.168.1.0/24 # Expose your network (modify accordingly) socksParentProxy = "localhost:9050" socksProxyType = socks5 proxyAddress = "0.0.0.0" # IPv4 only ...
On my Raspberry Pi, I also disable the caching by adding diskCacheRoot = ""
to the config, as this prevents polipo from filling up the SD card and breaking the proxy.
Restart both tor and polipo, and now you should have both a tor SOCKS and HTTP proxy.
Change your browser settings
Finally, you need to configure your browser (or your entire system) to use this proxy. This is different depending on what you’re using, but on Ubuntu you can set global proxy settings in your system settings, which will route all traffic over your new proxy (default port 8123).
iOS devices have a per-network proxy configuration found in your wireless network configuration (click on the little “i” icon).
Verify everything is working by visiting check.torproject.org.
Using Tor as a HTTP Proxy | Marcus Povey
Nice
tag:facebook.com,2013:1051122664947770_liked_by_10153108762888475
Paul Squires
https://www.facebook.com/100001501388539/posts/1051122664947770#liked-by-10153108762888475
tag:facebook.com,2013:1051122664947770_liked_by_10154043698930290
Padmini Ray Murray
https://www.facebook.com/100001501388539/posts/1051122664947770#liked-by-10154043698930290
tag:twitter.com,2013:713315376516435968_favorited_by_101421303
Amit Erandole
https://twitter.com/mapkyca/status/713315376516435968#favorited-by-101421303
A couple of important caveats with this:
1) You are not anonymous – browser fingerprinting can tell a lot about you to a sophisticated attacker with sensors around the wider internet, plus if you log in somewhere you’re exposing your ID to that site, basically as you would if you were using the regular internet. However, all your ISP will be able to tell (and all they’ll be able to record of ICR purposes) is that your computer connected to Tor, and so you’re massively limiting the utility of their tracking data.
2) Depending on how well behaved various apps are, you might still get some DNS leakage. I suggest a belts and braces approach – have a look at my earlier articles on encrypted DNS – https://www.marcus-povey.co.uk/2013/07/11/lets-stamp-out-cleartext-encrypting-dns-lookups/
tag:facebook.com,2013:1051122664947770_liked_by_10153993773185646
Abdul Saboor
https://www.facebook.com/100001501388539/posts/1051122664947770#liked-by-10153993773185646
Any friend who’d like this set up for them or their family, if you buy a raspberry pi and an SD card, I’ll happily set up a raspberry pi gateway for you
Popped round to my mum’s for tea, and helped protect her from the #IPBill – mapkyc.me/25ob3Vg
tag:twitter.com,2013:805721806443315200_favorited_by_17085904
Gareth Jones
https://twitter.com/mapkyca/status/805721806443315200#favorited-by-17085904
tag:twitter.com,2013:805721806443315200_favorited_by_14636746
Clinton シ
https://twitter.com/mapkyca/status/805721806443315200#favorited-by-14636746
Using Tor as a HTTP Proxy marcus-povey.co.uk/2016/03/24/usi… via @mapkyca
Hi
Can you tell me what to do when i am useing Windows 10? I thing your ToDos is for Linux Users… Sorry i am not a professional programmer .
Chris 🙂
How can I restart polipo in terminal?
For me, as root:
“`/etc/init.d/polipo restart“`