The Whonix Gateway can be used as a tor router for any virtual machine, including Kali Linux! Here is how to setup Whonix and Kali so that Kali Linux is completely routed through Tor.
Requirements
– Virtualbox
– Kali Linux
– Whonix-Gateway Virtualbox image
Step 1:
Install Kali Linux in Virtualbox, and perform updates (sudo apt-get update && sudo apt-get upgrade) then shut down the VM.
Step 2:
Download and import the Whonix Gateway Virtualbox appliance into Virtualbox. Only the gateway is needed.
Step 3:
Start the Whonix Gateway and proceed with the initial setup then perform any OS updates (sudo apt-get update && sudo apt-get upgrade). A reboot is generally required after the initial setup.
Leave the Whonix Gateway VM up and running. This is what will be used to connect to tor!
Step 4:
Next, edit the Virtualbox network settings for Kali Linux. Set Adapter 1 to Internal Network, and Whonix.
Step 5:
Boot Kali Linux and edit the relevant network settings.
Add the following to the bottom of /etc/network/interfaces
iface eth0 inet static address 10.152.152.11 netmask 255.255.192.0 gateway 10.152.152.10
Replace the entire contents of /etc/resolv.conf with the following:
nameserver 10.152.152.10
Bounce the interface inside Kali:
sudo ifdown eth0 sudo ifup eth0
Done.
Verify that Kali is using tor via the Whonix gateway by visiting a page inside Kali such as:
https://check.torproject.org or https://icanhazip.com.
scottlinux.com