Use Kali Linux Through Tor with Whonix Gateway

By | 2015/09/01

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.


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

Replace the entire contents of /etc/resolv.conf with the following:


Bounce the interface inside Kali:

sudo ifdown eth0

sudo ifup eth0


Verify that Kali is using tor via the Whonix gateway by visiting a page inside Kali such as: or