D
DM 3
Guest
To get a Tor Web Server up and running in around 18 second, do the following.
This has been tested on Ubuntu / Debian systems only.
Copy and paste the following script.
Save and exit, then run the file
This will install the needed software and present you with your new Tor webserver address and the default HTML folder you can upload your website content to.
This has been tested on Ubuntu / Debian systems only.
nano tor_server.sh
Copy and paste the following script.
Bash:
# update apt
sudo apt-get update -y
# install nginx and tor
sudo apt-get install tor nginx -y
# enable tor server
sed -i 's/#HiddenServiceDir/HiddenServiceDir/' /etc/tor/torrc
sed -i 's/#HiddenServicePort/HiddenServicePort/' /etc/tor/torrc
# restart tor service
sudo systemctl restart tor.service
# make a default index.html file
echo 'Welcome to our Tor website' > /var/www/html/index.html
# get the tor website address
TORADDRESS="$(cat /var/lib/tor/hidden_service/hostname)";
# get ipv4 address
IPADDRESS="$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')";
# clear the screen
clear
# echo some results
echo "HTML Root: /var/www/html";
echo "IPv4 / Insecure URL: http://$IPADDRESS";
echo "Tor / Secure URL http://$TORADDRESS";
echo " ";
Save and exit, then run the file
sudo sh tor_server.sh
This will install the needed software and present you with your new Tor webserver address and the default HTML folder you can upload your website content to.