How to Guide, Anonymizing Middlebox Tor proxy aka Transparently Routing Traffic Through Tor

This is something that just has to be written! Even if very messy and unpolished.  I literally googled for hours, tried everything and still came up short of my goal.  If you don't have any Linux/PC skills this will be hard. If you just want a solid Tor operating system try Liberte linux, the whonix system, tails linux or Tor gateway. Liberte and whonix being the most robust against attack. This semi-guide is about setting up a PC or rather a switch or WIFI router in your network that will route all traffic into the Tor network.


This isn't a complete guide but a better starting place than I had by far so good luck and I hope this helps. I used crunchbang linux btw. Also this setup requires 2 Ethernet ports /cards installed in the Tor box.


First we have https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy which comes close to giving you everything you need to get tor setup correctly (half the battle).
sudo apt-get install tor
That might work depending on your OS might not https://www.torproject.org/docs/debian.html.en
What you need to do is add torproject.org to your repository, just google a bit.  Then run sudo apt-get install tor again and if you added it correctly it will install.

Local Redirection and Anonymizing Middlebox

To enable the transparent proxy and the DNS proxy, add the following to your torrc. Found at /etc/tor/torrc   use sudo nano    nano is editor

VirtualAddrNetwork 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 9040
TransListenAddress 127.0.0.1
TransListenAddress 192.168.1.1
DNSPort 53
DNSListenAddress 127.0.0.1
DNSListenAddress 192.168.1.1

Configure your system's DNS resolver to use Tor's DNSPort on the loopback interface by modifying /etc/resolv.conf    edit this after tor is up and running

nameserver 127.0.0.1

 If you want to make the iptables rules permanent you have to make sure they are executed at start up time, for example by adding a script in the right directory. On Debian/Ubuntu you can do something like this:

sudo touch /etc/init.d/anonuser
sudo chmod 0755 /etc/init.d/anonuser
sudo nano /etc/init.d/anonuser

Nano is a text editor that you can use to put the following in the file... I've made changes that made my two interface setup work. Might need to have tor running first if it wont go after changes.

#!/bin/sh

# destinations you don't want routed through Tor
NON_TOR="192.168.1.0/24 192.168.0.0/24"

# the UID Tor runs as
TOR_UID="109"

# Tor's TransPort
TRANS_PORT="9040"

# your internal interface
INT_IF="eth0"
#your interface you hook a switch to so you can connect computers into your proxy
EXT_IF="eth1"

iptables -F
iptables -t nat -F

iptables -t nat -A OUTPUT -o lo -j RETURN
iptables -t nat -A OUTPUT -m owner --uid-owner $TOR_UID -j RETURN
iptables -t nat -A OUTPUT -p udp --dport 53 -j REDIRECT --to-ports 53
for NET in $NON_TOR; do
 iptables -t nat -A OUTPUT -d $NET -j RETURN
 iptables -t nat -A PREROUTING -i $INT_IF -d $NET -j RETURN
done

iptables -t nat -A OUTPUT -p tcp --syn -j REDIRECT --to-ports $TRANS_PORT

iptables -t nat -A PREROUTING -i $EXT_IF -p udp --dport 53 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -i $EXT_IF -p tcp --syn -j REDIRECT --to-ports $TRANS_PORT

iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
for NET in $NON_TOR 127.0.0.0/8; do
 iptables -A OUTPUT -d $NET -j ACCEPT
done
iptables -A OUTPUT -m owner --uid-owner $TOR_UID -j ACCEPT
iptables -A OUTPUT -j REJECT

You may need to use 'sudo bash anonuser' to run the script you just created. Check it has correct permissions to run 'ls -l anonuser' will show the permissions. You may have to copy it to your home folder to and then make it run, use   cp anonuser ~/    or something similar. Check sudo iptables --list   that should show rules in iptables!! If not read above.

B4 you try to run everything you need to setup your proxy interface correctly (eth1)
It needs to be static edit sudo nano /etc/networking/interfaces
 sudo /etc/init.d/networking restart   this restarts the network, you might need this, maybe it will give you an error like it did me? Ignore move on.  and or sudo ifconfig eth1 192.168.1.1 up    
Setup dnsmasq by sudo apt-get install dnsmasq  this is a DHCP server for ur proxy interface. edit sudo nano /etc/dnsmasq.conf then sudo /etc/init.d/dnsmasq restart
interface=eth1
listen-address=192.168.1.1
dhcp-range=192.168.1.1,192.168.1.254,1h
if you have more interfaces add them
interface=eth2 .... and ranges and so on

I used a switch to connect the two PC's lost about an hour playing with a router trying to make it work... my setup is as follows, internet >> proxy server >> anon pc   I didn't do anything to the anon pc its just stock.
I'm sure I missed some things but thats what google is for and just remember this project is really two things getting tor setup and getting your PC's talking to each other correctly. If you have a router make sure to disable dhcp and firewalls on it and plug all into the lan not wan/internet hub.

Views: 7723

Reply to This

Replies to This Discussion

Good article, thanks for sharing.

I've written a guide to some privacy/anonymity apps here

To answer some questions, what this setup allows you to do is have a WIFI network that routes all traffic through the Tor network. This way you can leave your WIFI unencrypted so anyone can use it and you don't have to worry about what they are doing (for the most part). If you don't want to run a WIFI you can just have a switch that you plug computers into and route the traffic through Tor that way. No configuring of the computers being plugged into the Tor switch or WIFI is required.

This setup requires 2 Ethernet connections on the Tor proxy server.

I would caution that the Tor exits can see your unencrypted traffic just be aware of that and I recommend installing the "https everywhere" plugin for your browser. Don't use services on Tor that are unencrypted like email as the Tor exit can read everything if it is not encrypted with https ...

You can if you wish solve the Tor exit problem by using a VPN but this slows your connection further vpnbook.com is free.

Wait. THere is one problem with that. If you run all of your internet traffic through TOR without changing online behavior, you have undermined the usefulness of TOR. 

Any online account you use that could personally identify you (email,banking,bill pay, etc.) should NOT be run through TOR. It doesn't matter how many anonymous loops you go through if you are still going to be connecting to services that can be used to identify you.

Keep this in mind...no amount of tools can keep you safe (online or offline) if you don't use them properly!

Thanks for the discussion.

Very true it all depends on what your situation is and what your trying to do. For most people they just want to blind their ISP and government from seeing their traffic. This video spells out how to operate if you really want to be anonymous http://12160.info/video/the-grugq-opsec-when-you-want-real-anonymity

RSS

"Destroying the New World Order"

TOP CONTENT THIS WEEK

THANK YOU FOR SUPPORTING THE SITE!

mobile page

12160.info/m

12160 Administrators

 

Latest Activity

Less Prone commented on tjdavis's photo
Thumbnail

iconism

"Germany remains a country under military occupation by its conqueror. US has 21 military bases and…"
44 minutes ago
Larry Harmen's 2 blog posts were featured
1 hour ago
Doc Vega's 5 blog posts were featured
1 hour ago
cheeki kea's blog post was featured

Dr. Aseem Malhotra's Explosive Court Testimony on COVID "Vaccines"(UPDATED)

 Doctor Malhotra drops arsenal of truth bombs on Helsinki. A spectacular display. Here are few snip…See More
1 hour ago
FREEDOMROX's blog post was featured
1 hour ago
cheeki kea commented on Less Prone's photo
Thumbnail

Famine or War What Would it Be

"I think it will be famine for some and war for others. "
4 hours ago
cheeki kea commented on Sandy's photo
Thumbnail

FB_IMG_1710523455761

"Burbia is correct. The Tik of the litter is successful in gorging itself at the information/media…"
5 hours ago
Less Prone posted a video

How the Government Uses Fear-Mongering to Alter Your Brain

Unlock the full interview here: https://bit.ly/3RCq6ccMolecular geneticist and immunologist Dr. Michael Nehls tells Tucker Carlson how fear-mongering is used...
15 hours ago
Doc Vega posted blog posts
21 hours ago
Doc Vega posted a photo

main-qimg-5806e1adb3109cf42e236b6063e7e3ec

The cowardly murderous Democrats out to destroy America.
23 hours ago
Sandy posted videos
yesterday
Burbia commented on Sandy's photo
Thumbnail

FB_IMG_1710523455761

"Is that the narrative now? Its more like Tik Tok influenced the younger generation to not be…"
yesterday
Burbia commented on Less Prone's photo
Thumbnail

Rebuilding Khazaria

"Who exactly are these beings? They violently push their way into the Middle East claiming it their…"
yesterday
Less Prone posted a photo

Famine or War What Would it Be

How far are these monsters allowed to go?
yesterday
Less Prone favorited cheeki kea's blog post The saddest post I've ever read. ( vaccine victim speaks out. )
Thursday
Less Prone commented on cheeki kea's blog post The saddest post I've ever read. ( vaccine victim speaks out. )
"It's so cruel and unfair. So many innocent people fell for it and even now the wictims are…"
Thursday
Doc Vega commented on truth's video
Thumbnail

MSM Admits US Funding Al-Qaeda & Taliban Terror Attacks

"In all likelihood if the MSM comes up with an explanation it's probably pure unadulterated…"
Thursday
Doc Vega commented on truth's video
Thumbnail

MSM Admits US Funding Al-Qaeda & Taliban Terror Attacks

"Mark Levin talks about all the front groups funded by Soros that have provided revenue for the…"
Thursday
Doc Vega favorited cheeki kea's blog post The saddest post I've ever read. ( vaccine victim speaks out. )
Thursday
Doc Vega commented on cheeki kea's blog post The saddest post I've ever read. ( vaccine victim speaks out. )
"Sad, but this is the fate of those who don't take heed and refuse to do their due diligence…"
Thursday

© 2024   Created by truth.   Powered by

Badges  |  Report an Issue  |  Terms of Service

content and site copyright 12160.info 2007-2019 - all rights reserved. unless otherwise noted