diff options
Diffstat (limited to 'tutorials/tor/how-to-host-a-tor-hidden-service.html')
-rw-r--r-- | tutorials/tor/how-to-host-a-tor-hidden-service.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tutorials/tor/how-to-host-a-tor-hidden-service.html b/tutorials/tor/how-to-host-a-tor-hidden-service.html index 7969078..794932e 100644 --- a/tutorials/tor/how-to-host-a-tor-hidden-service.html +++ b/tutorials/tor/how-to-host-a-tor-hidden-service.html @@ -1,6 +1,6 @@ <p>This might sound spooky and complicated, but it's really not. If you want to host a small site or a small file share among friends, I honestly think Tor is one of the easiest and safest options to set up.</p> <p>Getting a Tor hidden service running is so stupidly easy that it hardly deserves it's own article. Tor's website has a great guide right <a href="https://community.torproject.org/onion-services/setup/">here</a>. I figured I'd put my own spin on it by showing you show to host a temporary server to share some files with your friends. Please note the word <em>temporary</em> in that last sentence; running this way for a while is insecure and not a good idea. For a permanent solution, you'll want to host a real web server as explained <a href="/site/tutorials/www/how-to-make-this-site.html">here</a>.</p> -<p>Unlike that article, I will only explain how to do this on Linux since it's way easier and, to be honest, I've never tried to do it on Windows. If you've never used Linux before, buy a Raspberry Pi and follow the basic install guide. If you're strapped for cash, run it in a virtual machine, or use Windows Subsystem for Linux.</p> +<p>Like that article, I will only explain how to do this on Linux since it's way easier and, to be honest, I've never tried to do it on Windows. If you've never used Linux before, buy a Raspberry Pi and follow the basic install guide. If you're strapped for cash, run it in a virtual machine, or use <a href="https://docs.microsoft.com/en-us/windows/wsl/install">Windows Subsystem for Linux</a>.</p> <h2 id="how-to-spin-up-a-temporary-hidden-file-share-with-python">How to spin up a temporary hidden file share with Python</h2> <p>Once you have Debian/Ubuntu/whatever installed and it's updated to your liking, you can install Tor with:</p> <pre><code>$ sudo apt install tor</code></pre> @@ -19,11 +19,15 @@ HiddenServicePort 80 127.0.0.1:8000</code></pre> <p>Save and restart Tor for the changes to apply:</p> <pre><code>$ sudo service tor restart</code></pre> -<p>Once you do this, you'll get a new onion address located in the directory noted above. Use cat to read the hostname file:</p> +<p>Once you do this, you'll get a new onion address located in the directory noted above. Use cat to read the hostname file and copy it down somewhere. This is your ".onion" address:</p> <pre><code>$ cat /var/lib/tor/hidden_service/hostname</code></pre> <h3 id="set-up-the-server">Set up the server</h3> <p>Make some directory to hold your files.</p> -<pre><code>$ mkdir -pv files</code></pre> +<pre><code>$ mkdir -pv ~/files</code></pre> +<p>If you're on WSL you can copy files from your C drive like so:</p> +<pre><code>$ cp -vr /mnt/c/Users/username/Desktop/cats ~/files/</code></pre> +<p>On a remote server (like a Raspberry pi) you can use scp instead (replace 'rapsberry' with the hostname or local IP of you Pi):</p> +<pre><code>$ scp -vr cats pi@raspberry:~/files/</code></pre> <p>Since we're only doing this temporarily, we don't care too much about security or where the files should go, but if you want to be careful, you can issue the following to set the directory to read only after you copy your files in:</p> <pre><code>$ chmod -R 644 files</code></pre> <p>Change into the directory and run Python's built-in http server:</p> |