Version 10 (modified by proper, 9 years ago) (diff)


There are many discussions on the Tor Mailing list and spread over many forums about combining Tor with a VPN, SSH and/or a proxy in different variations. X in this article stands for, "either a VPN, SSH or proxy". All different ways to combine Tor with X have different pros and cons.


Anonymity and Privacy

You can very well decrease your anonymity by using VPNs in addition to Tor. If you know what you are doing you can increase anonymity, security and privacy.

Most VPNs log, there is a money trail if you can't pay really anonymously (an adversary is always going to probe the weakest link first...). A VPN acts either as a permanent entry or as a permanent exit node. This can introduce new risks while solving others.

Who's your adversary? Against a global adversary with unlimited resources more proxies make passive attacks (slightly) harder but active attacks easier as you are providing more attack surface and send out more data that can be used. Against colluding Tor nodes you are safer, against blackhat hackers who target Tor client code you are safer (especially if Tor and VPN run on two different systems). If the VPN/SSH server is adversary controlled you weaken the protection provided by Tor. If the server is trustworthy you can increase the anonymity and/or privacy (depending on set up) provided by Tor.

VPNs can also be used to circumvent Tor censorship (on your end by the ISP or on the service end by blocking known tor exits).

VPN versus Proxy

The connection between you and the VPN is (in most cases, not all) encrypted.

On the other hand the connection between you and an OpenProxy is unencrypted. An 'SSL proxy' is in most cases only a http proxy which supports the connect method. The connect method was originally designed to allow you to use to connect using SSL to webservers but other fancy things such as connecting to IRC, SSH, etc. are possible as well. Another disadventage of http(s) proxies is that some of them, depending on your network setup, even leak your IP using the 'http forwarded for' header (also so called non-anonymous proxy while the word anonymous would have to be recognized with care anyway, a single OpenProxy is much worse then Tor).

Also read Aren't 10 proxies (proxychains) better than Tor with only 3 hops? - proxychains vs Tor.

you -> X -> Tor

Some people under some circumstances (country, provider) are forced to use a VPN or a proxy to connect to the internet. Other people want to do that for other reasons, which we will also discuss.

you -> VPN -> Tor

You can route Tor through VPN services. That prevents your ISP etc from seeing that you're using Tor. Generally, VPNs are more popular than Tor, so you won't stand out as much. Once the VPN client has connected, the VPN tunnel will be the machine's default Internet connection, and the Tor Browser Bundle will route through it.

This can be a fine idea, assuming your VPN provider's network is in fact sufficiently safer than your own network.

Another advantage here is that it prevents Tor from seeing who you are behind the VPN. So if somebody does manage to break Tor and learn the IP address your traffic is coming from, but your VPN was actually following through on their promises (they won't watch, they won't remember, and they will somehow magically make it so nobody else is watching either), then you'll be better off.

The problematic thing with many VPN users is, the complicated setup. They connect to the VPN on a machine which has direct access to the internet. (No isolation.)

  • the VPN user may forget to connect to the VPN first
  • VPN connection might breaks down and the user continues to use the direct connection, which jumps in

To fix this issue you can get some hints from TorVPN.

you -> proxy -> Tor

This does not prevent your ISP etc from seeing that you're using Tor because the connection between your and the proxy is not encrypted.

Sometimes this prevents Tor from seeing who you are depending on the configuration on the side of the proxy server. So if somebody does manage to break Tor and learn the IP address your traffic is coming from, but your proxy does not log an the attacker didn't see the unencrypted connection between your and the proxy, then you'll be better off.

you -> Tor -> x

This is generally a really poor plan.

Some people do this to evade Tor bans in many places. (When Tor exit nodes are blacklisted by the remote server.)

(Read first for understanding: How often does Tor change its paths?.)

Normally Tor switches frequently its path through the network. When you choose a permanent destination X, you give away this advantage, which may have serious repercussions for your anonymity.

you -> Tor -> VPN

You can also route VPN services through Tor. That hides and secures your Internet activity from Tor exit nodes. Although you are exposed to VPN exit nodes, you at least get to choose them. If you're using VPNs in this way, you'll want to pay for them anonymously (cash in the mail [beware of your fingerprint and printer fingerprint], Liberty Reserve, well-laundered Bitcoin, etc).

However, you can't readily do this without using virtual machines. And you'll need to use TCP mode for the VPNs (to route through Tor). In our experience, establishing VPN connections through Tor is chancy, and requires much tweaking.

Even if you pay for them anonymously, you're making a bottleneck where all your traffic goes -- the VPN can build a profile of everything you do, and over time that will probably be really dangerous.

you -> Tor -> proxy

You can also route proxy connections through Tor. That does not hide and secure your Internet activity from Tor exit nodes because the connection between the exit node to the proxy is not encrypted, not one, but two parties may log and manipulate your clear traffic now. If you're using proxies in this way, you'll want to pay for them anonymously (cash in the mail [beware of your fingerprint and printer fingerprint], Liberty Reserve, well-laundered Bitcoin, etc) or use free proxies.

On way to do that is proxychains.

Another way would be to use a Transparent Proxy and then either proxify (set proxy settings) or socksify (use helper applications to force your application to use a proxy) the programs your want to chain inside your Transparent Proxy client machine, see for helper applications.

you -> X -> Tor -> X

No research on that yet if that is technically possible. This is because already 'you -> Tor -> X' is a really poor plan (see above).

you -> your own (local) VPN server -> Tor

This is different from above. You do not have to pay a VPN provider here as you host your own VPN server. This won't protect you from your ISP of seeing you connect to Tor and this also won't protect you from spying Tor exit servers. This is done to enforce that all your traffic goes through Tor. Further read: If you want this, it may unnecessary to use VPN, a simple Tor-Gateway may be easier