Switch to full style
Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems
Post a reply

Chaining www caching through Tor

Jul 06 07 6:33 am

Hi all,

I'm trying to get traffic coming from the LAN interface on my Wingate box to go through the cache module and then route through Privoxy and Tor (also running on the wingate box).

The problem I'm having is that Tor is complaining that it is being passed only the IP address and it suspects the DNS requests are leaking. As you may be aware the Privoxy/Tor system is a Socks 4a proxy where DNS lookups are put through the Tor network in addition to the actual port 80 content requests. It really defeats the purpose of using the Tor network to anonymize browser requests if the DNS lookups are out there in plain view.

I'm guessing at this point that my question is.. How do I indicate to the cache module (or possibly the DNS module) that I need to chain to a Socks 4a proxy (rather than a Socks 4). Privoxy seems to handle requests just fine when I install Privoxy and Tor on the LAN machines and "Torify" the browsers on those machines (ie cause them to proxy through Privoxy). My problem is how to Torify the cache module so I can force web _AND_ DNS requests through Tor using a single "choke point" for my entire LAN.

TIA

Jul 06 07 5:17 pm

Hi

WinGate does its own lookups prior to attemtping connections.

this is so that

1. you can specify policy on server IP
2. we can handle case where name lookup fails

the WWW proxy really isn't designed to enable going through an upstream socks 4a server. Socks 4a was never really ratified as a spec either which is why we never implemented it, and socks5 allows clients to specify a domain name to connect to.

It would be quite a reacrchitecture of the WWW proxy to enable it to make a SOCKS4a request without first trying to look up the DNS name, the DNS resolver can't help here either, since it sends all native requests out.

The Tor proxy, how does it connect to the Tor network do you know?

There's no VPN solution you could use? That would allow you to anonymise all traffic and protocols, not just DNS/HTTP.

Adrien

Jul 08 07 3:51 am

Thanks for the reply adrien,

The Tor proxy, how does it connect to the Tor network do you know?


I'm fairly new to Tor but the windows install "bundle" contains Privoxy, Vidalia (a Tor module GUI) and the Tor program itself. The whole idea of Privoxy is that it provides the proxy interface into the local Tor module. As far as the communication leaving a "Torified" LAN machine, all I know is what I see in the firewall logs - an initial series of outbound TCP connections to a fixed IP's port 9030 and then a couple of outbound TCP connections to what appears to be one of several possible IPs on 443 when the machine boots up. After that activity Vidalia reports Tor has established a circuit and the client seems to be valid.

From there browsing with IE (with the "auto detect proxy settings" checked under Internet Options - Connections - LAN settings) or Firefox (with a special "Tor Button" addon) produces outgoing TCP connections just like you'd normally see (ie doing DNS UDP and content TCP connections) except they are all TCP and to various IP-port combos (ie network entry nodes).


Anyway, I've made some progress but no success, I'm hoping someone can help with my workaround here.

I've installed an open source program called dns-proxy-tor on the wingate box which I've set to bind to localhost port 53. This program is specificly designed for Torifying applications that leak DNS lookups. When I change the preferred DNS in the external NIC's local area connection defn from auto to localhost and turn off the DNS service in Gatekeeper (or simply remove the binding to localhost) I get DNS lookups through Tor from a browser on the Wingate box just fine. (I can tell by the delay in the lookup and by the fact that when I turn off the Tor module the DNS lookups fail). When I turn on the DNS service in gatekeeper (with the bindings set to include localhost) lookups fail.

With the LAN machines I've always had the local area connection NIC defns give each machine an IP with the gateway and preferred DNS pointing to the Wingate box. When I enable the DNS server in gatekeeper I see the UDP port 53 interaction to and from the Wingate box but like using the browser directly on the Wingate machine, the DNS lookups fails.

When I change the Wingate box's external NIC's preferred DNS back to auto (rather than localhost) I get DNS success (ie leaking through my ISP's DNS servers) and the proxy and cache work great to socks4 proxy the port 80 content requests through Tor (I can tell by whatismyip reporting the exit node's IP instead of mine) but the tor logs warn it is getting IPs instead of URLs and suspects DNS leaks. Now if I could just get both DNS and content lookups going through the Tor network at the same time.

I would be perfectly happy to leave the Wingate DNS server out of the picture but how do I specify that I want the Lan machines to get thier DNS lookups from the wingate box's perfered DNS when it's set to localhost (ie the DNS-proxy-tor service)? I've tried specifying localhost as the perfered DNS in the wingate box's internal NIC's local area connection defn but that doesn't make any difference. What I do notice is that the Wingate DNS service lookups fail very quickly and I wonder if maybe the problem is that the Wingate DNS service doesn't wait the few seconds it takes to do a lookup via DNS-proxy-tor. I'm also wondering if binding the Wingate DNS server to localost is clobering DNS-proxy-tor's connection on 53. I can bind DNS-proxy-tor to another localhost port but I didn't see where I can change the Wingate DNS module to do DNS lookups at the external NIC's perferred DNS but at a port other than 53.


Suggestions?

TIA
Post a reply