New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Tor: how to

Got problems with your B2 or B3? Share and get helped!
Post Reply
fabio
Posts: 21
Joined: 03 Jul 2011, 09:09

Tor: how to

Post by fabio »

Excuse me if this has laredy been asked but couldn't find any information around.

It's great that B3 now include Tor, but how to use it? Is there a Wiki on the setup and how to use it as a proxy for my LAN clients?

Kind regards,

Fabio
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: Tor: how to

Post by Gordon »

Don't know how others are doing it, but I found that every configuration that is offered by the B3 web interface only allows Tor to connect to the Tor instance on the B3.

To use it as a proxy for LAN clients, start with configuring Tor as a private bridge in the web interface. Next SSH into the B3 and edit the file /etc/tor/torrc and change the value for SocksPort from 0 to 9050. Restart Tor.

Next open the file /etc/polipo/config in your editor and find and uncomment the following lines:

Code: Select all

proxyAddress = "0.0.0.0"    # IPv4 only

allowedClients = 127.0.0.1, 192.168.0.0/24    # Make this your LAN IP range !

socksParentProxy = "localhost:9050"
socksProxyType = socks5
Change your browser settings to use B3:8123 as the proxy address. That's it!


PS Do note that browsing through Tor is very sluggish. If you use Firefox you can grab the foxyproxy plug-in and create custom filters for proxying, which is very useful to enable access to web sites that are blocked by your ISP.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Tor: how to

Post by Ubi »

Do note that by using the same browser for both tor and non-tor traffic exposes yourself to that FBI sting you heard about last week
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: Tor: how to

Post by Gordon »

Ubi wrote:Do note that by using the same browser for both tor and non-tor traffic exposes yourself to that FBI sting you heard about last week
I hadn't, but it seems that for this you need to execute some kind of java routine that is provided by specific websites that would attract certain type of people. In all honesty I wouldn't shed a single tear
if any of those people would get caught this way. In my case I don't think the FBI would be very interested in knowing that I use Tor to circumvent a blockade installed by my ISP on account of some law in some country where the FBI has no jurisdiction.

In other words: f*ck Tim ...eehrm I mean the FBI...
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Tor: how to

Post by johannes »

Just a quick note, note that the Tor that is shipped with B3 does not allow you to anonymize yourself (or your LAN), it allows the B3 to act as a Tor server to help the Tor network keep performance decent. They have (at least had) constant issues with too few Tor nodes which caused poor performance, turning this option on on the B3 would contribute to the Tor project.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
fabio
Posts: 21
Joined: 03 Jul 2011, 09:09

Re: Tor: how to

Post by fabio »

Thanks everyone for your answers.

Johaness, this means that if I want to use the B3 for anonymizing, the pre-installed packages are useless?
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Tor: how to

Post by johannes »

Correct. Anonymizing your LAN should be doable if you know what you are doing but by not using the pre-installed features.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
Gordon
Posts: 1464
Joined: 10 Aug 2011, 03:18

Re: Tor: how to

Post by Gordon »

Coming back on my previous answer. I found that the current version of Firefox will support Socks5, so you can skip running and configuring Polipo on the B3

Following is my version of /etc/tor/torrc

Code: Select all

## Configuration file for Tor
## Last updated Mon, 26 Aug 2013 10:07:23 +0200
##
## Warning: This file is automatically generated by the web interface.
##          Any manual changes in this file might be lost when updating from web-admin.
##

Log notice file /var/log/tor/notices.log
Nickname Unnamed
ContactInfo Random Person <nobody AT example dot com>
RelayBandwidthRate 512 KBytes
RelayBandwidthBurst 1024 KBytes
PublishServerDescriptor 0
ExitPolicy reject *:*
SocksPort 9050
SocksListenAddress 127.0.0.1
SocksListenAddress 192.168.10.1:9050
As Johannes mentioned: if you try to change any settings for tor through the web interface this will overwrite this config. The last line may seem weird, but if you change SocksListenAddress to 0.0.0.0 you'll see warnings pop up every time. This will open up the Socks port for localhost and the LAN interface.

Next for Firefox it's best to use a PAC file. Go into Preferences and select the Network tab in the Advanced settings. Click on connection settings. At the bottom you'll find an entry for "Automatix proxy configuration url" which should point to an ASCII text file.

Example:

Code: Select all

# cat /home/gordon/.mozilla/kuiken.pac
function FindProxyForURL(url, host) {
      if (shExpMatch(host, "thepiratebay.*"))
      {
         return "SOCKS5 192.168.10.1:9050";
      }

// No proxy for local addresses
//      if (isInNet(host, "192.168.0.0",  "255.255.0.0"))
//      {
//         return "DIRECT";
//      }

      return "DIRECT";
   }
Do note that it is important to state 'SOCKS5' and not just 'SOCKS'. The difference is that with SOCKS5 the browser will also run the required DNS lookup through the proxy while with SOCKS it will do a regular DNS query.

PS forget about what I mentioned earlier about FoxyProxy - don't use it, the PAC file is all you need.
Post Reply