Wilders Security Forums  

Go Back   Wilders Security Forums > Privacy Related Topics > privacy technology
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread
  #1  
Old May 11th, 2012, 12:46 PM
barfootoo barfootoo is offline
Infrequent Poster
 
Join Date: May 2012
Posts: 2
Default Setting up redirection to TORs transparent proxy

[On Ubuntu]

I used an iptables ruleset based on the sample ruleset from https://trac.torproject.org/projects...ansparentProxy, Section Linux, Local Redirection Through Tor, to set up Tor as a transparent Proxy.

I thought I had understood that ruleset, but theres one point I simply dont get: That TCP segments are only redirected to the port Tor listens on when the SYN flag is set.

For example I want to visit www.example.com. My browser does a DNS request, gets the corresponding IP address and sends a TCP segment to that address, the SYN flag is set.

According to the ruleset, the segment is redirected to the Tor port, so Tor functions as a proxy, routes the IP packet to www.example.com and delivers the answer from the website server back to my browser. My browser gets a packet back where the source IP is that from the server and the ACK flag is set in the TCP payload, right?

So my browser sends the next TCP segment where the SYN flag is not set anymore to www.example.com's IP address.

But, there is no corresponding rule in the NAT table because the SYN flag isn't set. So it shouldnt get redirected or get accepted in the output table afterwards.

Nonetheless it seems to work fine (at least there are no packets from or to the actual IP addresses of the websites in the log file).

Someone on stackexchange suggested its because Tor resolves the DNS query for normal internet domains not to the real but to a mapped IP addresses within the specified address range so the packets with no SYN flag that dont get redirected get are considered an established connection

According to this, visiting a website with my browser typing in the the actual IP address so no DNS request is done shouldnt work, should it? : The initial SYN packet would be routed through the Tor network, but the following packets without SYN flag wouldnt and iptables should drop them (except iptables would deem the following packages as part of an established connection, but I guess in this case the connection to the website domain would not be torified at all cause no NAT was done for those packets).

Nonetheless, its working. Also, doing a DNS request with nslookup www.example.com brings up the real IP address, not a mapped on from the specified address range.

Unfortunately Wireshark isnt working for me atm so I cant find out whats exactly going on.

Im really confused. There must be some big point Im missing. Any ideas?

Thanks in advance!
  #2  
Old May 11th, 2012, 01:33 PM
mirimir mirimir is offline
Very Frequent Poster
 
Join Date: Oct 2011
Posts: 1,524
Default Re: Setting up redirection to TORs transparent proxy

I suggest that you ask on tor-talk. Several Tor developers monitor the list. See -https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk for joining.
  #3  
Old May 11th, 2012, 02:16 PM
barfootoo barfootoo is offline
Infrequent Poster
 
Join Date: May 2012
Posts: 2
Default Re: Setting up redirection to TORs transparent proxy

Quote:
Originally Posted by mirimir
I suggest that you ask on tor-talk. Several Tor developers monitor the list. See -https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk for joining.

Done... Will let you know when I get an answer.
 

Wilders Security Forums > Privacy Related Topics > privacy technology « Previous Thread | Next Thread »

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:31 PM.


Powered by vBulletin® Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2013, Wilders Security Forums