There is a fortune of misconception around the colored web, and most of the people think that it is not possible to create their web site on Dark network ( The Onion net ). today we will set up a web site in the Onion/Tor network for release ( With our own home server ) .
Screenshot of my dark website
As you can see above, I have created my web site in the Tor net, and I ‘ve accessed it using the Tor Browser .
This tutorial consists of three steps

  1. Preparing your computer (Not a real step)
  2. Installing & Configuring nginx
  3. Installing Tor
  4. Configuring the Tor server

Ingredients

  • An old computer (You can try on AWS EC2, but I’ve not tried it there) 💻
  • A stable internet connection 🌐
  • 2 hours ⌚
  • Comfort using terminal ⌨

Instructions

To begin with, find a spare calculator that can be used as a server ( If you do n’t have one, you can try following the tutorial on an AWS EC2 or similar service ). besides, you do not need a static IP for your darkness web web site .
To follow the tutorial, You will need to install a Linux based OS on the waiter ( we will refer your fifth wheel computer/cloud calculator as a waiter from now ), I have tested the downstairs steps on Ubuntu 18.04 Server LTS and I recommend that you besides use the like. Ubuntu 20.04 does n’t seem to work well with Tor .
It is besides recommended to use SSH to connect to your server since there will be no GUI, you will not be able to open this article on the server and copy-paste the commands. Typing the commands out will be time taking & besides identical erring .
In this article, I will not explain how to use & configure SSH but you can refer the under connect to understand & use SSH .
How To Use SSH To Connect To A Remote Server In Linux Or Windows
Important : Make indisputable you are running as root throughout the tutorial.

sudo su

Enter fullscreen mode exit fullscreen mode
Let ‘s get our hands dark 😎

Installing & Configuring nginx

The role of nginx is to serve the HTML files and assets ( dissemble as a network server ).

apt update
apt install nginx

Enter fullscreen manner die fullscreen mode
The above commands will update the waiter & install nginx. To start the nginx server

service nginx start

Enter fullscreen mode exit fullscreen modality
To check the status of the nginx server

service nginx status

Enter fullscreen mode die fullscreen mode
To confirm if the nginx server is working. We will make a GET request to the server using curl. Before that, you ‘ll need to know what is your IP address.

ifconfig

Enter fullscreen mode passing fullscreen mood
The output will be alike to this

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 134  bytes 21230 (21.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 134  bytes 21230 (21.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp9s0: flags=4163  mtu 1500
        inet your-ip-address  netmask 255.255.255.0  broadcast ###.###.#.###
        inet6 ####::####:####:####:####  prefixlen 64  scopeid 0x20
        ether ##:##:##:##:##:##  txqueuelen 1000  (Ethernet)
        RX packets 6379  bytes 8574482 (8.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3518  bytes 506008 (506.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Enter fullscreen mode exit fullscreen modality
Find your IP address in inet your-IP-address. Note it down, using that immediately make a curl request.

curl your-IP-address:80

Enter fullscreen mood exit fullscreen modality
The cabinet should print out the HTML code of the default nginx page. You can besides check if nginx is working by typing the IP address of the server in your browser .
To add your custom page, follow the steps from their official software documentation. Beginner ‘s lead – nginx

Installing Tor

Installing Tor ( not just the browser ) allows your calculator to communicate with the Tor network. Before installing Tor, we will have to install apt-transport-https, so that we can use informant lines with https://

apt install apt-transport-https

Enter fullscreen modality exit fullscreen mode
Important : The below commands are for Ubuntu 18.04 lone
If you are running early OS, please find the commands here, from Tor ‘s official, site. We will now open the sources file to add the Tor sources.

touch /etc/apt/sources.list.d/
nano /etc/apt/sources.list.d/

Enter fullscreen mode exit fullscreen mood
once the editor program is open, add the following sources to the file

deb https://themedipia.comrproject.org/torproject.org bionic main
deb-src https://themedipia.comrproject.org/torproject.org bionic main

Enter fullscreen manner die fullscreen manner
After exit & save, type the following in the terminal. This is to add the gpg key used to sign the Tor packages.

curl https://themedipia.comrproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -

Enter fullscreen mode exit fullscreen mode
last, now we install Tor and besides a package which will help to keep the sign key current.

apt update
apt install tor deb.torproject.org-keyring

Enter fullscreen manner passing fullscreen mode
exchangeable to nginx, Tor can be started & checked by the adopt commands

service nginx start
service nginx status

Enter fullscreen modality exit fullscreen mode

Setting up the tor server

immediately that we have nginx & Tor up and running, we will have to configure Tor so that our server acts as a Tor server (Your server will not be used as a relay node)
For this, we will have to edit the torrc file. The torrc is the shape file for your Tor, the office of the file is such that, you can alter Tor to act as a proxy server & put up to the Tor net ( not in this tutorial ). In this tutorial, the torrc will be configured to act as a tor webserver ( onion service ).

nano /etc/tor/torrc

Enter fullscreen mode exit fullscreen mood
In the torrc charge, Go to the middle incision and look for the line

############### This section is just for location-hidden services ###

Enter fullscreen mood exit fullscreen manner
And uncomment the postdate lines.

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80

Enter fullscreen mode die fullscreen manner
In these lines ,

  • HiddenServiceDir will tell Tor where to save the private_key & hostname of your Tor web site ( They are information about your dark web site ). The private key stored is very important & could be used to impersonate you. In lawsuit you change your server, you precisely need to copy-paste your private key into the new server .
  • HiddenServicePort lets you specify a virtual port ( that is, what interface people accessing the web site will think they ‘re using ) and an IP address and larboard for redirecting connections to this virtual port .

To apply this fresh shape, Stop the Tor service and start it again by typing the follow commands.

service tor stop
service tor start

Enter fullscreen mood exit fullscreen mode
now check the status of the tor serve to see if the changes are working & valid.

service tor status

Enter fullscreen mood die fullscreen manner
If things are looking good, proceed to the following step, otherwise, you might have made a error in editing the .torrc file .
At this point, your dark web site must be running. But we do n’t know what is the URL, to get it, run the pursuit command

cat /var/lib/tor/hidden_service/hostname

Enter fullscreen mode exit fullscreen mode
The URL to your all-new blue web site will be printed in the console table. To test if it ‘s working

curl -v --socks5-hostname localhost:9050 http://your-onion-domain.onion

Enter fullscreen mode exit fullscreen mode
The URL is actually your-public-RSA-key.onion. Tor has a different way of identifying websites, i.e. via their public RSA key.

You might notice that the URL generated, is very long and you might be wondering how to create customs hostname ( i.e. Custom RSA public key ). I will be creating an article on this topic very soon .
now let ‘s celebrate on your inaugural dark web site 🎉. besides please share your thoughts in the comments 😁 ( For example, you can ask me to add instructions on “ how to add your custom page in nginx “ )
Celebration

informant : https://themedipia.com
Category : Website hosting

Leave a Reply

Your email address will not be published.