Using corridor, a Tor traffic whitelisting gateway with Whonix ™
- 1 Introduction
- 2 Connecting to corridor before Tor
- 3 Debugging
- 4 Credits
- 5 Footnotes
Connecting to corridor before Tor
It is possible to configure Whonix-Gateway ™ (
sys-whonix) to use corridor as a local proxy to establish the following tunnel:
This is not necessarily more anonymous, but it does provide an additional fail-safe -- a Tor traffic whitelisting firewall that helps protect against accidental clearnet leaks (hypothetical clearnet leak bugs in Whonix ™). As corridor's project description [archive] states: "... it cannot prevent malware on a client computer from finding out your clearnet IP address."
corridor is mostly useful for developers and auditors of Whonix ™, along with advanced users who would like to have an additional safety net. Note that it cannot protect from hypothetical bugs affecting Qubes' ProxyVM; a physically-isolated, standalone corridor-Gateway [archive] is necessary to cover that leak vector.
corridor does not increase the tunnel length, meaning no more relays are added between a user and the destination. Users interested in this configuration should read Tunnels/Introduction.
This behavior might be dangerous if users need / want to hide Tor and Whonix ™ from the ISP.
If Whonix ™ is already in use, then configuring a second running instance of Tor will ensure that it is independent of the one running inside Whonix-Gateway ™ (
sys-whonix). From the ISP's perspective, the user will have a different network Fingerprint. The anonymity impact should be no worse than running Tor Browser, or system-tor and Whonix ™ at the same time.
Create a new standalone ProxyVM called sys-corridor based on the Debian
Qube Manager →
Create new Qube →
enable 'Standalone qube based on a template' →
name: sys-corridor →
template: debian →
Enable the corridor qvm service:
Qube Manager →
left-click sys-corridor →
Qube settings →
type in the field →
press + →
sys-corridor and open a terminal using Qubes start menu.
While these instructions remain experimental, it is advised to run the following systemctl commands to check everything is functioning correctly.
sudo systemctl --no-pager status corridor-data sudo systemctl --no-pager status corridor-init-forwarding sudo systemctl --no-pager status corridor-init-logged sudo systemctl --no-pager status corridor-init-snat
Optional: BridgeFirewall corridor Configuration
- Run the above systemctl commands again.
- Create or use an appropriate existing AppVM named
- Install / run either system-tor (from Debian or Fedora package sources) or Tor Browser.
- Set the NetVM of
sys-corridor. Tor should be still able to connect.
To test system-tor, start watching Tor's log.
sudo tail -f /var/log/tor/log
Check if it made an initial, successful connection.
Then restart Tor.
sudo service tor restart
Check if Tor is still able to connect.
To test Tor Browser:
- First check Tor Browser can make an initial connection to the Internet while the NetVM is still set to
- Next set the NetVM to
sys-corridorand confirm it is still able to connect. If so, that is a positive sign.
- Finally attempt an untorified connection by using an application like Chromium or Firefox browser. Untorified applications should fail to connect to the Internet.
Whenever corridor blocks attempted actions (like the tests above), a message will appear in syslog. To inspect /var/log/syslog
Open /var/log/syslog in an editor as a regular, non-root user.
To check for blocks inside
sudo tail -f /var/log/syslog
If corridor blocks anything, the output will be similar to this.
Jul 19 00:58:27 localhost kernel: [ 954.706833] corridor:
Interpreting the Results
The safest configuration is only setting
sys-whonix to use
sys-corridor as a NetVM. The reason is the qubes-update-check.service [archive] will try to use the Internet without Tor, and other programs [archive] may also try to use clearnet. Therefore, always shut down
To set the NetVM of
Qube Manager →
left-click sys-whonix →
Qube settings →
The procedure is now complete.
If problems are encountered, this section provides tips on gathering useful information for debugging.
Check if the corridor_relays ipset gets populated.
sudo ipset list corridor_relays
It is recommended to also install the usability-misc package from Whonix ™ repository, since it provides the iptables-save-deterministic command. Alternatively, retrieve the package from elsewhere.
sudo apt-get install usability-misc
In Qubes, the output should be similar to the following.
*nat :PREROUTING ACCEPT [0,0] :INPUT ACCEPT [0,0] :OUTPUT ACCEPT [0,0] :POSTROUTING ACCEPT [0,0] :CORRIDOR_SNAT - [0,0] -A POSTROUTING -j CORRIDOR_SNAT -A CORRIDOR_SNAT -s 10.137.0.0/16 ! -d 10.137.0.0/16 -j MASQUERADE COMMIT *filter :INPUT ACCEPT [0,0] :FORWARD ACCEPT [0,0] :OUTPUT ACCEPT [0,0] :CORRIDOR_FILTER - [0,0] -A FORWARD -j CORRIDOR_FILTER -A CORRIDOR_FILTER -m conntrack --ctstate RELATED,ESTABLISHED -j RETURN -A CORRIDOR_FILTER -m set --match-set corridor_relays dst,dst -j RETURN -A CORRIDOR_FILTER -m set --match-set corridor_logged src -j LOG --log-prefix "corridor: reject " --log-macdecode -A CORRIDOR_FILTER -j REJECT --reject-with icmp-host-prohibited COMMIT
- Corridor for Whonix ™ KVM ticket [archive].
- Without third party contributions to corridor, Non-Qubes-Whonix ™ is unlikely to be supported in the near future.
The following is unreliable due to gpg connectivity bugs [archive].
sudo apt-key --keyring /etc/apt/trusted.gpg.d/whonix.gpg adv --keyserver hkp://ipv4.pool.sks-keyservers.net:80 --recv-keys 916B8D99C38EAF5E8ADC7A2A8D66066A2EEACCDA
- bridge vs non-bridge users anonymity [archive].
- The Whonix ™ Bridges page can help, but the steps do not apply one-to-one.
- This skip is stepped if Tor entry guards [archive] are preferred.
- https://github.com/rustybird/corridor/issues/42 [archive]
This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix ™, then Edit! Edits are held for moderation.
Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP. Whonix ™ is a trademark. Whonix ™ is a licensee [archive] of the Open Invention Network [archive]. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix ™ itself. (Why?)