The linked guide describes how to connect from a Linux client through Tor to a VNC server running on a hidden service .
It should also work for connecting to non-onion VNC servers through Tor, and on Tails provided that you tell
torsocks what SOCKS port Tails is using. It might be 9151, though I couldn't confirm if that's current.
VNC Remote Support via Tor Onion Services
For your case, the guide should boil down to 3 steps (though I have not tested):
- Set an administrator password in Tails' startup options.
- After startup, install
torsocks and a compatible VNC viewer:
Enter the Tails admin password you set when prompted. The package manager update can take awhile. If you've set a persistent volume, it's possible to configure automatic installation on boot.
amnesia$ sudo apt-get update && sudo apt-get install torsocks xvnc4viewer
- Run the VNC viewer through tor:
amnesia$ torsocks --port 9151 xvnc4viewer example.org
9151 with Tails' tor socks port, and
example.org with your remote VNC server IP or hostname.
Note that torsocks is not generally a safe way to tor-ify programs, in the case that the program may use networking library calls that torsocks does not know to override.
However, Tails' firewall is designed to prevent any outgoing connections except through Tor, and thus should prevent any leaks. i.e., torsocks is generally safe if used within Tails.