Whonix for Beginners. Installation and Setup.



Fixxx

Elite
Ultimate
Joined
31.10.19
Messages
205
Reaction score
404
Points
63
1719256212086.png
In this article I will describe for what Whonix is and how it works. Whonix is a virtual machine-based operating system consisting of two virtual machines: Whonix-Gateway and Whonix-Workstation. Whonix-Gateway acts as a virtual router and Whonix-Workstation is the virtual machine that the user interacts with. When a user runs Whonix all of their internet traffic is routed through the Tor network. Whonix-Gateway is responsible for handling all connections to the Tor network and ensuring that all Internet traffic is routed through Tor. Whonix-Workstation is completely isolated from the host operating system: it doesn't know the user’s real IP because connects to the Internet only through Whonix-Gateway.


Whonix benefits.
Whonix provides users with a high level of anonymity and confidentiality by sending all Internet traffic through the Tor network. Whonix-Workstation is completely isolated from the host operating system, providing an additional level of security. This means that malware or viruses that may be present in the host operating system should not affect Whonix-Workstation and conversely, viruses from Whonix-Workstation should not affect the host operating system. Despite it's advanced privacy and security features Whonix is easy to use and doesnt require any advanced technical knowledge. Users simply download and install the operating system and can use it like a regular Debian-based Linux distribution. Whonix is open source, which means users can examine the code to ensure there are no backdoors or vulnerabilities in the operating system. Since Whonix is a virtual machine it must be run on some kind of hypervisor - VirtualBox, KVM and QubesOS (Xen) can act as a hypervisor.

The most stable and fastest Whonix virtual machines run on QubesOS, followed by VirtualBox and the latest KVM. VirtualBox/KVM must be run on some OS (host system), here the OS selection criteria are quite modest:
  1. Easy to install and use.
  2. No user tracking.
  3. Stable operation.
  4. A set of software to minimize the attack surface on the host system and resource consumption.
  5. Based on Debian/Ubuntu so that the commands on the host system and Whonix are the same.
The choice here is quite small:
  • Debian
  • Pop OS
I recommend Debian because it's the reference Linux distribution and has a minimal set of software, hasn't been known to spy on users and is one of the most stable OSs. Pop OS is on this list only because it has an edition with a built-in proprietary NVIDIA driver which makes installation on a PC with NVIDIA video cards very easy and it's also simple and easy to use. Thus, the choice of the main OS is as follows:
  • Debian for users who have experience with Linux.
  • Pop OS for beginners or those with a PC with an NVIDIA graphics card.

Whonix Installing.

First, install VirtualBox on Ubuntu with the command:

sudo apt install virtualbox virtualbox-ext-pack
For VirtualBox to work correctly you need to add a user to the vboxusers group. This can be done with the command:

sudo adduser $USER vboxusers

After this, reboot the system for the changes to take effect. Now you need to download Whonix for VirtualBox.

1719258358946.png

Double click to open the file and a VirtualBox window will open, click Finish.

1719256713746.png

Accept the agreement to import 2 virtual machines, click Agree.
After the import is complete we have 2 Whonix virtual machines.

1719256917367.png

Launch Gateway, select Understood/Verstanden and click Next, then click Finish.
In the window with connection to the Tor network select Configure and click Next.

1719257154838.png

Now check the box I need Tor bridges to bypass the Tor censorship, then request bridges on bridges.torproject.org, click Provide a bridges I know and paste the resulting bridges into the field, then click Next.

1719257509212.png

At this stage we don’t change anything and just click Next (at the next stage also).

1719257636481.png

Wait for connection to Tor and click Finish.

1719257683149.png

The initial setup of Gateway is complete. Now we minimize this virtual machine (not close it - without a working Gateway there will be no Internet on Workstation) and launch Workstation, doing all the same steps as when we initially launched Gateway.

1719257827085.png

This completes the installation and initial setup of Whonix.

1719257902820.png

Default username - user. Standard password for Whonix (which needs to be changed) - changeme.
 

Fixxx

Elite
Ultimate
Joined
31.10.19
Messages
205
Reaction score
404
Points
63
Later there will be a continuation:
About installing Whonix on KVM.
 

Fixxx

Elite
Ultimate
Joined
31.10.19
Messages
205
Reaction score
404
Points
63
Now I will tell you about installing Whonix on KVM. The main OS will be Ubuntu 23.04.


First you need to install KVM and the necessary additional components. For Ubuntu we run the command:

sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils libguestfs-tools genisoimage virtinst libosinfo-bin virt-manager dnsmasq
Then you need to add the user to certain groups for KVM commands to work correctly:

sudo adduser $USER libvirt
sudo adduser $USER libvirt-qemu
After these steps you need to reboot the device. Then download the virtual machine image from here. Move the downloaded file to the current user's home directory. Now let's proceed with the installation: unpack the archive with the command:

tar -xvf Whonix*.libvirt.xz

Now we move on to the configuration of virtual networks and machines by sequentially executing the following commands:

sudo virsh -c qemu:///system net-define Whonix_external*.xml
sudo virsh -c qemu:///system net-define Whonix_internal*.xml
sudo virsh -c qemu:///system net-autostart Whonix-External
sudo virsh -c qemu:///system net-start Whonix-External
sudo virsh -c qemu:///system net-autostart Whonix-Internal
sudo virsh -c qemu:///system net-start Whonix-Internal
sudo virsh -c qemu:///system define Whonix-Gateway*.xml
sudo virsh -c qemu:///system define Whonix-Workstation*.xml
We transfer the virtual machine disk images to the appropriate folder using the commands:
sudo mv Whonix-Gateway*.qcow2 /var/lib/libvirt/images/Whonix-Gateway.qcow2
sudo mv Whonix-Workstation*.qcow2 /var/lib/libvirt/images/Whonix-Workstation.qcow2

We delete unnecessary files after installation with the command:

rm Whonix* && rm -r WHONIX*

Now open the virtual machine manager and see 2 Whonix virtual machines:

1.png

We launch Whonix-Gateway - unlike the version for VirtualBox, it doesn't have a graphical environment to reduce resource consumption. If your provider blocks Tor, then run a VPN on the main system because the bridge in Whonix-Gateway can only be entered manually and this is not very convenient. When starting, the system will ask us for a login and password, according to the standard the login is user and the password is changeme - enter it and get into the system.

2.png
3.png

To connect to Tor enter the command:

sudo whonixsetup
In the window that opens select Understood/Verstanden and press Enter (in the next window the same).

4.png
In the next window select I'm ready to enable Tor.

6.png
Now select Yes and wait for Tor activation.

7.png

If everything went well, click OK.

8.png
Next, we go to the terminal again if the connection to Tor was successful.

9.png

This completes the initial setup of Gateway. Minimize Gateway and launch Workstation. Workstation already has a graphical environment - select Understood/Verstanden 2 times in a row and then click Finish.

10.png
12.png

This completes the installation and initial configuration of Whonix on KVM.
 
Last edited:
Top Bottom