Actions

Whonix-Gateway Security Hardening

From Whonix


Introduction[edit]

Info Tip: Disabling Control Port Filter Proxy [archive] (onion-grater) can improve security by decreasing the attack surface, while sacrificing usability.

Note that if onion-grater is disabled, users will no longer receive helpful Whonix ™ notifications when Tor is not fully bootstrapped, since the whonixcheck and sdwdate tools rely upon it.

How-to: Disable Control Port Filter Proxy[edit]

Whonix-Gateway ™[edit]

Deactivate onion-grater in Firewall[edit]

1. Modify Whonix User Firewall Settings.

Note: If no changes have yet been made to Whonix Firewall Settings, then the Whonix User Firewall Settings File /etc/whonix_firewall.d/50_user.conf appears empty (because it does not exist). This is expected.

If using Qubes-Whonix ™, complete these steps.

Qubes App Launcher (blue/grey "Q")Template: whonix-gw-15Whonix User Firewall Settings

If using a graphical Whonix-Gateway ™, complete these steps.

Start MenuApplicationsSettingsUser Firewall Settings

If using a terminal-only Whonix-Gateway ™, complete these steps.

sudo nano /etc/whonix_firewall.d/50_user.conf

For more help, press on Expand on the right.

Note: The Whonix Global Firewall Settings File /etc/whonix_firewall.d/30_default.conf contains default settings and explanatory comments about their purpose. By default, the file is opened read-only and is not meant to be directly edited. Below, it is recommended to open the file without root rights. The file contains an explanatory comment on how to change firewall settings.

## Please use "/etc/whonix_firewall.d/50_user.conf" for your custom configuration,
## which will override the defaults found here. When Whonix is updated, this
## file may be overwritten.

See also Whonix modular flexible .d style configuration folders.

To view the file, follow these instructions.

If using Qubes-Whonix ™, complete these steps.

Qubes App Launcher (blue/grey "Q")Template: whonix-gw-15Whonix Global Firewall Settings

If using a graphical Whonix-Gateway ™, complete these steps.

Start MenuApplicationsSettingsGlobal Firewall Settings

If using a terminal-only Whonix-Gateway ™, complete these steps.

nano /etc/whonix_firewall.d/30_default.conf

2. Add the following content.

CONTROL_PORT_FILTER_PROXY_ENABLE=0

3. Save the file.

4. Reload Whonix-Gateway ™ Firewall.

If you are using Qubes-Whonix ™, complete the following steps.

Qubes App Launcher (blue/grey "Q")Whonix-Gateway ™ ProxyVM (commonly named sys-whonix)Reload Whonix Firewall

If you are using a graphical Whonix-Gateway ™, complete the following steps.

Start MenuApplicationsSystemReload Whonix Firewall

If you are using a terminal-only Whonix-Gateway ™, run.

sudo whonix_firewall

Deactivate onion-grater[edit]

1. Stop onion-grater.

sudo service onion-grater stop

2. Disable autostart of onion-grater.

sudo systemctl mask onion-grater

3. Reboot.

4. Check if onion-grater is still running or disabled.

ps aux | grep onion-grater

If output similar to the following appears, then disabling did not work.

onion-g+   911  3.2  1.9  66444 20644 ?        Ss   12:21   0:00 /usr/bin/python3 -u /usr/lib/onion-grater --debug --listen-interface eth1

Deactivate whonixcheck onion-grater Running Test[edit]

1. Open file /etc/whonix.d/50_user.conf in an editor with root rights.

(Qubes-Whonix ™: In TemplateVM)

This box uses sudoedit for better security [archive]. This is an example and other tools could also achieve the same goal. If this example does not work for you or if you are not using Whonix, please refer to this link.

sudoedit /etc/whonix.d/50_user.conf

2. Add the following content.

whonixcheck_skip_functions+=" check_control_port_filter_running "

3. Save the file.

Whonix-Workstation ™[edit]

Deactivate whonixcheck Tor Bootstrap Test[edit]

Because it relies on onion-grater.

1. Open file /etc/whonix.d/50_user.conf in an editor with root rights.

(Qubes-Whonix ™: In TemplateVM)

This box uses sudoedit for better security [archive]. This is an example and other tools could also achieve the same goal. If this example does not work for you or if you are not using Whonix, please refer to this link.

sudoedit /etc/whonix.d/50_user.conf

2. Add the following content.

whonixcheck_skip_functions+=" check_tor_bootstrap "

3. Save the file.

Deactivate sdwdate Connectivity Test[edit]

Whonix-Workstation ™ only.

1. Open file /usr/lib/helper-scripts/te_pe_tb_check in an editor with root rights.

(Qubes-Whonix ™: In TemplateVM)

This box uses sudoedit for better security [archive]. This is an example and other tools could also achieve the same goal. If this example does not work for you or if you are not using Whonix, please refer to this link.

sudoedit /usr/lib/helper-scripts/te_pe_tb_check

2. Replace the existing content with the following text.

#!/bin/bash
exit 0

3. Save the file.

4. Restart sdwdate.

sudo systemctl restart sdwdate

The procedure is complete.

Be aware that this setting will not persist after any upgrade of sdwdate, nor is sdwdate currently configurable. [1]

Tor Browser Updater[edit]

In order to update Tor Browser using Tor Browser Updater by Whonix ™ developers while onion-grater is disabled, complete the following step. [2]

update-torbrowser --no-tor-con-check

Or create a file /etc/torbrowser.d/50_user.conf with the following content.

TB_NO_TOR_CON_CHECK="1"

Static VirtualBox IP[edit]

Instead of using DHCP to obtain the internal IP address for the Whonix-Workstation ™ eth0 NAT adapter, a static IP can be used instead. This might marginally improve security because the DHCP package can then be removed.

Open /etc/network/interfaces.d/30_non-qubes-whonix on GitHub [archive] and read the comments. Then, comment out DHCP and comment in Static VirtualBox IP.

Footnotes[edit]

  1. Any Whonix ™ users interested in further development should create a relevant ticket on Phabricator [archive].
  2. It is far simpler to update using Tor Browser's internal updater instead.


Join us in testing our new AppArmor profiles [archive] for improved security! (forum discussion [archive])

https [archive] | (forcing) onion [archive]
Follow: Twitter.png Facebook.png 1280px-Gab text logo.svg.png Rss.png 1024px-Telegram 2019 Logo.svg.png Discourse logo.svg

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contriute

Whonix donate bitcoin.png

Share: Twitter | Facebook

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?)

Whonix ™ is a derivative of and not affiliated with Debian [archive]. Debian is a registered trademark [archive] owned by Software in the Public Interest, Inc [archive].

Whonix ™ is produced independently from the Tor® [archive] anonymity software and carries no guarantee from The Tor Project [archive] about quality, suitability or anything else.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent. Whonix ™ is provided by ENCRYPTED SUPPORT LP. See Imprint.

Monero donate whonix.png