User Tools

Site Tools


public:tutorial:syno_tor

Install a TOR Relay / Bridge on a Synology NAS

TOR is a network to provide anonymity and privacy.

To decide if you want to install a relay or bridge please read https://community.torproject.org/relay/types-of-relays/

To install a own relay or bridge on a synology, please do NOT use the ipkg package, as it is not written by the TOR developers but create your own package in some easy steps.

1. Connect to your NAS via SSH

To install and configure a TOR relay or bridge you must use the command line.

2. Get the source

Download the latest source code from their Homepage https://torproject.org/download/tor/ or http://expyuzz4wqqyqhjn.onion/download/tor/. Try to directly load it to the NAS.

wget https://dist.torproject.org/tor-X.X.X.X.tar.gz

3. Extract and build package

Extract the package:

tar x -f tor-X.X.X.X.tar.gz

Then build and install the package. This is different between versions and the documentation is not up to date. Change the working directory to the extracted folder. The following worked for me

 cd tor-X.X.X.X
 ./configure && make && make install

If there are errors while configuring, try to solve them by installing missing packages with ipkg. Search for the actual package name with

ipkg list | grep MISSING-PACKAGE

and install the package using the name the last command returned

ipkg install PACKAGE-NAME
## for example
#ipkg install make

Also an upgrade of the used packages can help.

ipkg update
ipkg upgrade

4. Harden your system

This is a really good time to harden your system. You don't want to have a vulnerable public tor relay. You really don't.

5. Configure your relay / bridge

Edit the torrc file. Current file location (tor-0.4.3.5) is src/config/torrc. The file nicely explains every config part, so please read carefully. An other explantion can be found here.

6. Run the relay

version tor-0.4.3.5:

PATH_TO_TORDIRECTORY/src/app/tor -f PATH_TO_TORDIRECTORY/src/config/torrc

Terminate the relay

Look up the PID

ps -ef | grep tor

and kill the relay

kill PID
# or kill -SIGINT PID

Persist the relay

The relay won't start up automatically with the boot of the NAS. To enable this, simply create a Task in the Web-GUI.

WebGUI -> Control Panel -> Task Scheduler -> Triggered Task

Enter PATH_TO_TORDIRECTORY/src/app/tor -f PATH_TO_TORDIRECTORY/src/config/torrc

Remember to use absolute paths! I recommend to send logs to a log account.

Monitor TOR

Use the syslog option in the torrc file and/or install nyx to monitor your relay.

More about TOR

public/tutorial/syno_tor.txt · Last modified: 2020/12/01 08:41 by lithilion