cedryc
Posts: 1
Joined: Thu Aug 29, 2013 12:46 pm

Simple TOR gateway...

Thu Aug 29, 2013 1:24 pm

Hi guys!

I've got some problems with a simple TOR project I'm actually working on.

My goal is to have TOR running on my Pi, so I can browse the web anonymously from another computer (on the same ethernet LAN) configured with the Pi as a proxy. Basically, that's an "Onion Pi" without the wireless part.

I'm running Raspbian on a 512 MB model B, with eth0 configured with '192.168.1.115'.
Here is a step-by-step guide to what I've done...

First, I installed TOR:

Code: Select all

sudo apt-get install tor
Then I edited the TOR config file "/etc/tor/torrc" with the following lines:

Code: Select all

Log notice file /var/log/tor/notices.log
VirtualAddrNetwork 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 9040
TransListenAddress 192.168.1.115
DNSPort 53
DNSListenAddress 192.168.1.115
I flushed my NAT table:

Code: Select all

sudo iptables -F
sudo iptables -t nat -F
Redirected the incoming DNS traffic:

Code: Select all

sudo iptables -t nat -A PREROUTING -i eth0 -p udp --dport 53 -j REDIRECT --to-ports 53
And incoming TCP traffic:

Code: Select all

sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --syn -j REDIRECT --to-ports 9040
Finally, I restarted the TOR service:

Code: Select all

sudo service tor restart
And checked that everything is alright in the logs:

Code: Select all

/var/log/tor/notices.log
Last thing I did was to configure a FireFox browser on another computer with my Pi as proxy:

Code: Select all

Manual proxy configuration:
    HTTP proxy: 192.168.1.115 Port: 9040
    SSL proxy: 192.168.1.115 Port: 9040
    FTP proxy: 192.168.1.115 Port: 9040
    SOCKS proxy: 192.168.1.115 Port: 9040
When I try to access the Web from this browser, I get a "proxy server is refusing connections" error...

Is anyone here has tried something similar?
Could you please help me with this problem?

It's just a test, I do it for fun.
I know there are many more precautions to be anonymous on the Web...

Thanks a lot!
Ced

emptypipes
Posts: 2
Joined: Tue Oct 29, 2013 6:38 pm

Re: Simple TOR gateway...

Tue Oct 29, 2013 6:44 pm

Cedryc

I have been trying the same setup and have the same problem as you. Have you found a solution?

Homer

emptypipes
Posts: 2
Joined: Tue Oct 29, 2013 6:38 pm

Re: Simple TOR gateway...

Wed Oct 30, 2013 1:40 pm

Well I somewhat have it working, but not the most simple and elegant way. I am running two raspberry pi's. One running Torberry and the other privoxy. https://code.google.com/p/torberry/ Torberry runs tor without any configuration, just flash the image and boot. From there, I tried to install privoxy, but kept getting errors. So, until i can get it running on one Pi, this will have to do

I was a tad hesitant running the image, but i do trust these guys https://www.youtube.com/watch?feature=p ... xlM#t=2036 jump to 34 min mark

User avatar
PiJunk
Posts: 2
Joined: Thu Nov 07, 2013 6:21 pm
Location: Internet
Contact: Website

Re: Simple TOR gateway...

Thu Nov 07, 2013 6:24 pm

It's simple to get this going. I will have an example on my tumblr blog doing this same thing on Arch Linux. The post should appear on Saturday.

http://pijunk.tumblr.com/
http://pijunk.tumblr.com
Watch as I document all my fumbling with Arch Linux on my Raspberry Pi

FreeDNS
http://freedns.afraid.org/

Kymru
Posts: 18
Joined: Tue Aug 06, 2013 11:28 am
Location: Y Drenewydd, Cymru

Re: Simple TOR gateway...

Wed Nov 27, 2013 12:03 pm

PiJunk wrote:It's simple to get this going. I will have an example on my tumblr blog doing this same thing on Arch Linux. The post should appear on Saturday.

http://pijunk.tumblr.com/
just out of curiosity, did this work for you cedryc?

Edit - got it working by putting Privoxy on the Pi with Tor on it, access Privoxy by the internal lan IP address on port 8118, connect Privoxy to Tor via the config file...works with my browser on my Win7 comp

adrianbuford
Posts: 1
Joined: Tue Apr 12, 2016 4:15 pm

Re: Simple TOR gateway...

Tue Apr 12, 2016 4:29 pm

Need to configure proxy to listen
SocksListenAddress 192.168.0.2
SocksPolicy accept *
##SocksPolicy reject *

Return to “Networking and servers”