############## Whonix Gateway ############## This is how I setup ``sys-whonix`` and ``sys-whonix-auth``. Apart from ``sys-whonix-auth`` containing `Authenticated v3 Onion Services`_, both are identical. ******************************** Switching to Official Repository ******************************** Update to the more up-to-date Tor version from the upstream repository. See `Installing Tor on Debian`_ in the Tor's official Documentation. .. _Installing Tor on Debian: https://www.torproject.org/docs/debian.html.en ************* Hardening Tor ************* Enable hardening options: .. code-block:: bash cat >>/usr/local/etc/torrc.d/50_user.conf <>/usr/local/etc/torrc.d/50_user.conf </dev/null; do :; done qvm-firewall "$host" add action=drop dsthost=10.0.0.0/8 comment="site local" qvm-firewall "$host" add action=drop dsthost=169.254.0.0/16 comment="site local" qvm-firewall "$host" add action=drop dsthost=172.16.0.0/12 comment="link local" qvm-firewall "$host" add action=drop dsthost=192.168.0.0/16 comment="site local" qvm-firewall "$host" add action=drop dsthost=fc00::/8 comment="site local" qvm-firewall "$host" add action=drop dsthost=fd00::/8 comment="unique site local" qvm-firewall "$host" add action=drop dsthost=fe80::/10 comment="link local" qvm-firewall "$host" add action=accept proto=tcp qvm-firewall "$host" add action=drop .. warning:: This will interfere with outgoing proxies in local networks. .. _authenticated-v3-onion-services: ******************************* Authenticated v3 Onion Services ******************************* If you use authenticated onion services, consider setting up a separate NetVM with access to authenticated hidden services. Create one file per key using this naming scheme: ``/var/lib/tor/authdir/.auth_private``. Content:: :descriptor:x25519: Example:: wa4yuhn2vloyc5nul6kbbzmyyzvom4bzjza4bdrarhrt5adfpetbqnid:descriptor:x25519:xbhzr3i7fombypfngvti4go4dymnyvxdxjh2lfkc4pwazsqwr3kq