This is Part Three, the final part in the series. PART ONE HERE, and PART TWO HERE
INSTALL TOR
Once your computer has rebooted, you are ready to install TOR and the TOR Server. Let’s get started!
Open your terminal and type the following:
sudo apt install tor
Enter your password, then wait for the installation.
Now install a text editor:
sudo apt install gedit
Now we need to configure the torrc file located in etc/tor/torrc (it’s easiest to copy and paste the commands so you don’t make an error or miss a space):
sudo gedit /etc/tor/torrc
This will open the torrc file for editing… see the screen shot, and look for the highlighted text:
Now, remove the hashtag from the two highlighted lines, so they look like this:
Click save and close the file.
Now restart Tor by typing the following in the terminal:
sudo service tor restart
It will ask you for your password, so enter it.
Now it’s time to install a web server. This is also easy.
Open your terminal and type the following:
sudo apt install apache2
Enter your password, then confirm the installation by pressing “y” for yes.
Now you need to know what your .onion address is. Type the following:
sudo cat /var/lib/tor/hidden_service/hostname
You will receive a string of characters followed by .onion… this will be your .onion address. Right click on the line and select copy, then save it to a file for future use.
Now it’s time to edit your index.html page and set up your website. The easiest way to do this is simply to navigate to the page as follows:
sudo gedit /var/www/html/index.html
It may be more convenient to simply open the www folder as root. To do this you double click on Computer (top left of your screen), then open File System, then open var, then right-click on www and select Open as Root: This will require your password, then the folder will open. Be careful not to delete the html folder or the index.html file inside – this is your main page for your website. You might right-click inside the window and create a new folder, and name it backup or something like that, then copy the html folder into it.
Now you have a hidden service website. Edit your index.html to create a new page with either a text editor if you’re comfortable editing html, or a WYSIWYG (What You See Is What You Get) Editor such as Blue Griffon, which is available in the Software Manager in Administration in your Menu. If starting with a text editor, you might try something like this:<!DOCTYPE html>
<html>
<head>
<title>Welcome to My Hidden Site</title>
</head>
<body> This is the first line of my hidden website. Now it is time to edit!</body>
</html>
Save that file as index.html, then on your computer with the TOR Browser installed, try opening your page with the .onion address you copied down earlier. If you have done everything correctly, you will be able to open your page in the TOR Browser. You can also open it in Chrome, Brave, or Dissenter Browser by copying the url, select Shift+Alt+N and pasting the url into the address bar.
Congratulations! You now have a hidden website, and as long as your computer is on, you will be able to access your site from anywhere, and others will be able to access your content. Your next step will be to design your page, and there are several resources on the internet to download free website templates, including the one you are reading now that came via Free CSS Website Templates by ZyPOP. Time to get started… if you’ve never built a website before, start small, and grow from there.
Please use your website for good and positive purposes, and watch this site for more helpful and informative articles. Most importantly, use every tool at your disposal to fight tyranny. This is one of those tools.
Sir -- I applaud your three posts on creation of a “sandboxed” TOR environment using a VM under your current OS. I will save your good work as PDFs.
The VirtualBox VM implementation can be troublesome to folks who are new to virtual machine operation, particularly with regard to enabling function of I/O devices on the host OS.
Prior to your decision to use the VM, did you consider the alternative of installing and booting a “live” linux OS from a USB3 stick that also contains a persistent storage partition ?
The USB alternative has the advantage that when you unplug and pocket the USB, your complete OS travels with you and can be run from any convenient “host” PC. Also, it leaves your home computer entirely unmodified and “virgin” to any potential .gov hacker or home invader.
https://learnlinuxandlibreoffice.org/2-linux-to-the-rescue/2-3-create-a-usb-stick-with-persistent-storage
@Hans Thank you for your comments… great post. I have done both, and in fact, on part one in the comments (I think) that conversation came up. You are right about the input/output issues with a VM… getting the VM to read an external usb stick, or camera, etc is quite problematic. Because my intent for the VM was to create a hidden service, period, I did not think the I/O issues were a major factor, although adding images, videos, etc can require some work. One possibility of the VM is to have the clipboard available in a bidirectional manner, as well as drag-and-drop, to obtain material from your main machine, although this creates a security issue for the main driver. Another consideration was that you can run the VM at the same time as your main driver, without having to boot into a USB. The USB option may actually be better for those with a spare computer they are not otherwise using, and obviously the portability of a complete system on a flash drive that fits in your pocket.
So, creating a bootable system on a USB drive is a great option, and I may write a follow-up post with instructions on how to do this. The tutorial would still include the VPN, as well as setting up TOR, but the difference would be teaching how to install the operating system on a flash drive. Pretty straightforward, but does have the risk (for those who are not as comfortable with this sort of thing) of accidentally wiping the main drive and not selecting the USB as the destination. Seems easy, but makes the argument quite strongly to backup all of your data, just in case. Ahem… we should all be doing that in any event…