Combining Tunnels with Tor
From Whonix
< Tunnels
Introduction[edit]
User
→ Tor
→ proxy/VPN/SSH
→ Internet
User
→ proxy/VPN/SSH
→ Tor
→ Internet
Advertisement:
Too difficult to set up? Provider specific automation can be created for you by the lead developer of Whonix ™. Send reasonable price suggestions. Get in contact.
It is possible to combine Tor with tunnels like VPNs, proxies and SSH. The traffic can be sent through both Tor and the second tunnel, in either order. However, this is an advanced topic and appropriate only for special cases. Adding a second connection does not automatically improve security, but it will add significant complexity. The potential positive or negative effects on anonymity [archive] are being controversially [archive] debated [archive]. On the balance of the evidence VPNs should be avoided, and these same arguments could be made against other tunnels too.
The improper combination of Tor and another service may actually degrade a user's security and anonymity. These configurations are difficult to set up and should only be attempted by advanced users. For the vast majority of Whonix ™ users, using Tor in isolation – without a VPN or proxy – is the correct choice.
Tor blocks by destination servers can usually be bypassed using simple proxies, rather than adding an additional tunnel to Tor. In order to circumvent state-level censorship of the Tor network, Bridges or other alternative circumvention tools will probably be required. [1]
The law of triviality / bikeshedding [archive] applies to VPNs. While VPNs are frequently discussed, related privacy issues receive much less attention, including: TCP Initial Sequence Numbers Randomization [archive] (tirdad [archive]); Keystroke Deanonymization (kloak [archive]); guard discovery and related traffic analysis attacks [archive] (vanguards); Time Attacks (sdwdate); and Advanced Deanonymization Attacks. See also: Anonymity Bibliography, Selected Papers in Anonymity [archive].
Warnings[edit]
Tunnel Link Risks[edit]
Anonymity can be negatively affected under some circumstances by using an additional tunnel, such as a VPN, proxy or SSH. [2] [3] To mitigate any potential risks refer to the background information below, draw your own conclusions and take preventative steps where necessary.
Table: Tunnel Warnings
Configuration | Description |
---|---|
Individual Tunnel Links | Individual tunnel-links should only be used for a single configuration and never reused in any other tunnel-link chains. If this advice is ignored, any anonymous identities associated with the tunnel-link might be tied to the user's ISP-assigned IP address. |
Qubes Tunnel Configuration | It is not recommended to run the tunnel software from within a TemplateVM. This is because the whonix-gw-16 TemplateVM acts more like a workstation since it is behind sys-whonix and is not sys-whonix itself.
|
Tunnel Provider / Configuration | Do not use the same tunnel provider / configuration in more than one place at the same time. For example, do not use the same tunnel setup inside Whonix-Gateway ™ as well as inside Whonix-Workstation ™. Also do not use the same tunnel setup on the host and inside a Whonix-Gateway ™ or Whonix-Workstation ™ at the same time.
In tunnel-chain 1, the ISP-assigned IP address is permanently linked to the tunnel-link. In tunnel-chain 2, the same tunnel-link was reused. Since the user's ISP-assigned IP address was previously linked to that same tunnel-link, the "anonymous" identity can now be linked to the user's actual IP address.
The previous example also holds true if the tunnel-link is first used with tunnel-chain 2 and then reused in tunnel-chain 1. In this case, all anonymous activities conducted with tunnel-chain 2 would be linked with the user's ISP-assigned IP address. |
VPN Tunnel Risks[edit]
As noted in the introduction, whether or not VPNs materially improve security and/or anonymity is a hotly debated topic, and a configuration that is frequently raised in the Whonix ™ forums. The consensus opinion of security professionals is that VPNs pose more risks than benefits, and it is for this reason Whonix ™ does not endorse their use. As renowned cryptographer and computer security professional Bruce Schneier has noted: [5]
We don’t talk about it a lot, but VPNs are entirely based on trust. As a consumer, you have no idea which company will best protect your privacy. You don’t know the data protection laws of the Seychelles or Panama. You don’t know which countries can put extra-legal pressure on companies operating within their jurisdiction. You don’t know who actually owns and runs the VPNs. You don’t even know which foreign companies the NSA has targeted for mass surveillance. All you can do is make your best guess, and hope you guessed well.
Domain | Description |
---|---|
Anonymity |
|
Design |
|
Logging |
|
Malware |
|
Security |
|
Tor + VPN |
|
Trust | VPN providers represent a single point/entity of potential failure. Unlike Tor which distributes trust across multiple relays, VPN adherents must trust the provider does not:
|
Use Case Exceptions | There are two possible use cases that might warrant a VPN provider:
|
VPN + Tor |
|
Challenges in Tunnel-link Provider Selection[edit]
It is essential to consider the following factors when selecting a tunnel-link provider. Anonymity can be materially affected by the chosen network/operator's location, network/operator/IP address commonality with Tor relays, use of shared infrastructure, and other variables.
Table: Provider Selection Considerations
Domain | Description |
---|---|
End-to-end Correlation (Confirmation) Attacks |
|
Shared IP Addresses |
|
Operator/Network Shared Infrastructure |
|
Tunnel-link Connection Chain Risk |
|
Tunnel Provider Criteria |
|
Tor Relay Selection |
|
Comparison Table[edit]
User → Proxy → Tor → Internet
|
User → VPN / SSH → Tor → Internet
|
User → Tor → Proxy / VPN / SSH → Internet
| |
---|---|---|---|
Modified Configuration Location | Whonix-Gateway ™ | Whonix-Gateway ™ [or host (FAQ)] | Whonix-Workstation ™ |
Evade Website Tor Bans | No | No | Maybe |
Evade Network Censor Tor Bans | Maybe [21] [22] | Maybe [23] | No |
Hide Tor and Whonix ™ from ISPs | Very weak [24] | Very weak [25] | No |
No Loss of Stream Isolation | Yes | Yes | No |
Browser Web Fingerprint is not Worsened | Yes | Yes | No |
Extra Tunnel Link does not Require Reconfiguration [26] of Pre-configured Software [27] | Yes | Yes | No |
No Permanent Exit Relay | Unaffected | Unaffected | No |
Tor Onion Services (.onion) Connections | Yes | Yes | No |
Hosting Location Hidden Services | No | No | Proxy: No VPN: If the VPN supports Remote Port Forwarding, yes |
Increased Tunnel Length | Yes | Yes | Yes |
Anonymity Effects | Disputed [28] | Disputed [28] | Disputed [28] |
Tunnel UDP over Tor | No | No | Proxy: No VPN: If supported by the VPN, yes |
Connecting to a Tunnel-link (Proxy/VPN/SSH) before Tor[edit]
Table: Pre-Tor Tunnel-link
Domain | Description |
---|---|
Connection Scheme | User → proxy/VPN/SSH → Tor → Internet
|
Network Traffic | In this case, your Internet traffic will:
|
Use Cases |
|
Warnings [29] |
|
How to connect to a VPN before Tor (User
→ VPN
→ Tor
→ Internet
)
How to connect to a proxy before Tor (User
→ proxy
→ Tor
→ Internet
)
How to connect to SSH before Tor (User
→ SSH
→ Tor
→ Internet
)
How to connect to JonDonym before Tor (User
→ JonDonym
→ Tor
→ Internet
)
How to connect to Lantern before Tor (User
→ Lantern
→ Tor
→ Internet
)
Connecting to Tor before a Tunnel-link (Proxy/VPN/SSH)[edit]
Table: Post-Tor Tunnel-link
Domain | Description |
---|---|
Connection Scheme | User → Tor → proxy/VPN/SSH → Internet |
Network Traffic | In this case, your Internet traffic will:
|
Use Cases |
|
Warnings [30] |
|
How to connect to Tor before a VPN (User
→ Tor
→ VPN
→ Internet
)
How to connect to Tor before a proxy (User
→ Tor
→ proxy
→ Internet
)
How to connect to Tor before SSH (User
→ Tor
→ SSH
→ Internet
)
How to connect to Tor before I2P (User
→ Tor
→ I2P
→ Internet
)
How to connect to Tor before JonDonym (User
→ Tor
→ JonDonym
→ Internet
)
See Also[edit]
Footnotes[edit]
- ↑ Users in China are unlikely to circumvent government censorship [archive] with vanilla bridges, as they are uniformly blocked. That said, Anon Connection Wizard configured with the meek-amazon or meek-azure pluggable transport was reported to bypass Chinese censorship in late 2017. In 2019, only meek-azure is available in Anon Connection Wizard.
- ↑ https://lists.torproject.org/pipermail/tor-talk/2016-July/041757.html [archive]
- ↑ research / document impact for tunnel users if Tor relays hosted at the same tunnel provider [archive]
- ↑ This is because file /lib/systemd/system/openvpn@openvpn.service.d/50_unpriv.conf [archive] checks the following condition:
ConditionPathExists=!/var/run/qubes-service/whonix-template
This means if file
/var/run/qubes-service/whonix-template
exists, which is the case in Whonix ™ TemplateVMs, the openvpn@openvpn service will not start. - ↑ https://www.schneier.com/blog/archives/2021/06/vpns-and-trust.html [archive]
- ↑ https://gist.github.com/joepie91/5a9909939e6ce7d09e29 [archive]
- ↑ https://matt.traudt.xyz/posts/vpn-tor-not-mRikAa4h.html [archive]
- ↑
Website traffic fingerprinting is an attack where the adversary attempts to recognize the encrypted traffic patterns of specific web pages without using any other information. In the case of Tor, this attack would take place between the user and the Guard node, or at the Guard node itself.
- ↑ https://forums.whonix.org/t/hiding-tor-whonix-is-difficult-beyond-practicality/7408 [archive]
- ↑ It could be argued these services truly only exist to sell overpriced bandwidth, with flimsy promises made to attract gullible customers.
- ↑ https://www.computerweekly.com/news/252466203/Top-VPNs-secretly-owned-by-Chinese-firms [archive]
- ↑ https://www.theregister.co.uk/2011/09/26/hidemyass_lulzsec_controversy/ [archive]
- ↑ It is logical that governments would set up providers in this manner to attract citizens who have a greater interest in protecting their privacy, since that traffic is deemed more interesting for intelligence purposes.
- ↑ If any of these streams detect packet loss, then there is backing off of the transmission rates and re-transmitting of packets thought to be lost.
- ↑ In this case, the VPN provider will still be able to snoop on traffic and potentially manipulate it.
- ↑ Pluggable transports make Tor traffic look different so it is not fingerprinted, and thus hopefully not blocked.
- ↑ It is arguably better for a larger Tor user base to form over time and the Tor network to scale up in size to stymie this capability.
- ↑ It is likely GPAs will also compromise the most popular VPNs as part of their lawless 'Collect It All' philosophy.
- ↑ http://tor.stackexchange.com/a/114/80 [archive]
- ↑
- ↑ See Using a Proxy.
- ↑ This only works against simple IP blocking lists, because connections to proxies are usually not encrypted.
- ↑ In these situations, VPNs are also often censored. You might be better off using Bridges.
- ↑ See Using a Proxy.
- ↑ See Hide Tor and Whonix ™ from your ISP.
- ↑ Disabling Stream Isolation.
- ↑ If you did not disable Stream Isolation, then applications still pre-configured for Stream Isolation would only go through Tor and not through the extra tunnel link. You must decide which applications should have Stream Isolation disabled. For example, if for some reason you wanted to use gpg through the extra tunnel link, but not Tor Browser, then only disable stream isolation for gpg.
- ↑ 28.0 28.1 28.2 See Tor Plus VPN or proxy [archive].
- ↑ These warnings are not specific to Whonix ™, but are general issues with combining Tor and various tunnel-links.
- ↑ These warnings are not specific to Whonix ™, but are general issues with combining Tor and various tunnel-links.
- ↑ When configuring
User
→Tor
→proxy/VPN/SSH
→Internet
, it is impossible to connect to Onion Services because the last server is not a Tor relay. The only exception is running another Tor client on top, but this would lead to a Tor over Tor scenario which is discouraged for security reasons. - ↑ If setting up a socksifier, proxy settings, transparent proxy with local redirection, SSH tunnel or a VPN in a leak-free manner were easy -- ensuring nothing will bypass the VPN, SSH or proxy -- then it would have been unnecessary to develop Whonix ™ in the first place. The methods described in the tunnel documentation have all been tested to work. In the case of misconfiguration or leak bugs, the protections afforded by Whonix ™ and Tor still apply. This means the leak will still go through Whonix-Gateway ™ and therefore be forced through Tor. The methods in the tunnel documentation are not as safe as a Whonix-Gateway ™. There were earlier development discussions and some progress (see Dev/Inspiration) towards chaining multiple Gateways (VPNBOX, JonDoBOX, I2PBOX, FreenetBOX and ProxyBOX), but nothing was finished due to the lack of community interest, support and developer input.
- ↑ Bug #3455: Tor Browser should set SOCKS username for a request based on referer [archive]
- ↑ https://forums.whonix.org/t/vpn-after-whonix-inside-workstation-not-work-anymore-with-tbb/2153/5 [archive]
Whonix ™ is Supported by Evolution Host DDoS Protected VPS. Stay private and get your VPS with Bitcoin or Monero.
100px | |
Fosshost | About Advertisements |
Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki
Priority Support | Investors | Professional Support
Whonix ™ | © ENCRYPTED SUPPORT LP | Freedom Software / Open Source (Why?)
The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.