Simple Tor Hidden Service Setup Script
This Bash script automates the process of setting up a simple Tor Hidden Service on a Debian-based system (like Ubuntu). It installs the necessary packages, runs a local Python web server on a port you specify, and configures Tor to route to it.
- A Debian-based operating system (which uses the
aptpackage manager). sudoaccess, as the script needs to install packages and modify system configuration files.
-
Make the Script Executable Before running the script, you must grant it execution permissions:
chmod +x tor.sh
-
Run the Script Execute the script (it handles
sudointernally for necessary commands):./tor.sh
-
Enter Your Port The script will first prompt you to enter a port for the local web server. This is not the public port, but the port on
127.0.0.1(localhost) that the Python server will listen on.Masukkan port yang ingin digunakan untuk hidden service (contoh: 8080): 8080 -
Wait for Setup to Complete The script will then automatically perform the following steps:
- Install
torandpython3. - Create the server directory.
- Start the Python HTTP server in the background.
- Configure Tor (
/etc/tor/torrc). - Restart the Tor service.
- Install
-
Get Your .onion Address Once finished, the script will print your new
.onionaddress to the terminal.
To change the content displayed on your .onion site, you need to edit the index.html file or add other files to the server directory.
- Server Directory Location:
~/tor_service(Thetor_servicefolder in your Home directory). - Main HTML File:
~/tor_service/index.html
You can edit this index.html file or place your own HTML, CSS, and image files inside the ~/tor_service directory to serve them.
