Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-22-2012, 12:34 AM   #1
LQ Newbie
Registered: Apr 2009
Posts: 9

Rep: Reputation: 0
Setting up transparent proxy through TOR

Hello everyone,

I've been trying to transparently route all my traffic through TOR, as per the official guide: (section "Transparently anonymizing traffic for a specific user"). However, the IPTables commands they provide always produce errors.

The following commands:

iptables -t nat -A OUTPUT ! -o lo -p tcp -m owner --uid-owner anonymous -m tcp -j REDIRECT --to-ports 9040
iptables -t nat -A OUTPUT ! -o lo -p udp -m owner --uid-owner anonymous -m udp --dport 53 -j REDIRECT --to-ports 53
iptables -t filter -A OUTPUT -p tcp -m owner --uid-owner anonymous -m tcp --dport 9040 -j ACCEPT
iptables -t filter -A OUTPUT -p udp -m owner --uid-owner anonymous -m udp --dport 53 -j ACCEPT
iptables -t filter -A OUTPUT ! -o lo -m owner --uid-owner anonymous -j DROP
all produce the error message "iptables: No chain/target/match by that name.", however, 'nat' is a valid target, 'OUTPUT' is a valid chain and there are no invalid matches. I am stumped, I can't get it to work.

Can someone explain to me how to do this correctly? I am on Gentoo and using IPTables version 1.4.13.

Thanks in advance,

Old 07-22-2012, 05:06 AM   #2
Registered: May 2011
Distribution: Gentoo
Posts: 98

Rep: Reputation: 16
It's possible that you have parts of Netfilter disabled in the kernel configuration; see .
Anyway, if you still can't get it to work, you can try my tun2socks software to forward via Tor. You may however have some problems if you try to do it all on one machine (as opposed to having a Tor-ified virtual machine).

Last edited by ambrop7; 07-22-2012 at 05:08 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a Tranparent Tor proxy therite Linux - Newbie 1 04-07-2011 11:51 AM
LXer: Setting up ubuntu 10.04 (Lucid) server with squid 3 as a Transparent Proxy LXer Syndicated Linux News 0 06-22-2010 08:11 PM
Setting up a transparent proxy with only one box. leftler Linux - Networking 1 03-23-2010 07:32 PM
setting up dansguardian as a transparent proxy for hosts dcordina Ubuntu 3 03-02-2009 09:57 AM
setting up transparent proxy tsaravan Linux - Networking 4 03-30-2007 08:44 AM

All times are GMT -5. The time now is 07:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration