Tor Relay - Online anonimity - a new syno package

The discussion lounge for third-party packages.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
Gigix
Beginner
Beginner
Posts: 22
Joined: Sun Jan 29, 2012 8:15 pm

Tor Relay - Online anonimity - a new syno package

Unread post by Gigix » Sun Aug 25, 2013 1:57 am

For the last few weeks I tried to make a package for TOR (The Onion Router). If you never heard of it, is for online anonymity. Visit http://torproject.org. Because the NAS is always on, is a perfect candidate for running a Tor Relay. For almost a year I run a relay on my small DS211j and now, with my limited knowledge of Linux and shell scripting, I did this package. If you are interested, check out my site http://ggteknikus.tk.
In order to make the package available for all platforms I used the Package Toolkit provided by synology. Was not easy for me to figure how this works, but now all the cross compiling, building and collecting is fully automated. One big problem and a strange problem. On the majority of platforms the binaries are linked into shared libraries instead of executable.
CFLAGS and LDFLAGS are identical on all platforms but results are different. After few days of investigations still nothing, is very frustrating.
Please help!
Tor Relay / Config File Editor
http://ggteknikus.tk/sspks/
DS211j

niewiesznic
Knowledgeable
Knowledgeable
Posts: 321
Joined: Fri Mar 26, 2010 12:52 am

Re: Tor Relay - Online anonimity - a new syno package

Unread post by niewiesznic » Sun Aug 25, 2013 8:08 pm

HI!
Excellent! Can You add the package to SynoCommunity repository http://www.synocommunity.com/?
I have posted info on the package release in polish Synology forum http://pronas.pl, if you don't mind.

Can you make an improvement? A possibility to change settings after installation (port numbers, type of TOR relay, bandwith limits, everything you can set up on installation)?

Can it be run as a client for my home computers (sorry, for lame question, I have no experience with TOR other than client)?
Regards,
niewiesznic
_________________________________________
DS1515+, Cisco SLM2008, Squeezebox Classic and Squeezebox Boom.

Gigix
Beginner
Beginner
Posts: 22
Joined: Sun Jan 29, 2012 8:15 pm

Re: Tor Relay - Online anonimity - a new syno package

Unread post by Gigix » Mon Aug 26, 2013 7:10 pm

I need first to resolve the linker problem on my binaries.

I don't mind.

After installation the only way you can make changes is by editing the configuration file: /var/packages/torelay/target/etc/tor/torrc and restart (if is not easyer to uninstall and install again). I didn't now how hard it is to implement a GUI.

This is not a client. As client, use the bundle downloaded from torproject.org. It contain:
1 Firefox (configured for tor network let's call it "client"),
2. Tor ( to run a relay on your computer and having the same functions as this package. It can be disabled if configured as client only)
3. Vidalia (a configuration software, controlling both functions).

Is possible to open a socket in the Relay and configure the client to use the socket for entering tor network, but not in current implementation (I will put this in whishlist). Of course you can use configuration file if you want it. In this way no one sniffing your connection will detect when you are using the tor and when not (your connection cannot be distinguish from other's using your relay).
Tor Relay / Config File Editor
http://ggteknikus.tk/sspks/
DS211j

niewiesznic
Knowledgeable
Knowledgeable
Posts: 321
Joined: Fri Mar 26, 2010 12:52 am

Re: Tor Relay - Online anonimity - a new syno package

Unread post by niewiesznic » Mon Aug 26, 2013 7:56 pm

The possibility to work as a TOR for all machines in local network instead of running TOR / Vidalia on each computer would be a huge benefit for package. Please mind, that many Synology users are like me, without GUI I can not change settings with ease if at all.
Just my 2 cents. It is allready running on my DS.

Anyway, I really appreciate the SPK! :)
Regards,
niewiesznic
_________________________________________
DS1515+, Cisco SLM2008, Squeezebox Classic and Squeezebox Boom.

Gigix
Beginner
Beginner
Posts: 22
Joined: Sun Jan 29, 2012 8:15 pm

Re: Tor Relay - Online anonimity - a new syno package

Unread post by Gigix » Sun Sep 01, 2013 8:45 am

Check out the new version of the package. Now the Tor relay can act as a Tor proxy for your internal network. Another step was added to install wizard. Uninstall the old package and install the new one (torelay-0.2.3.25-011).
On socks configuration step you need to put a connection port (for example 9100), your local network (may be 192.168.0.0) and a the mask like 255.255.255.0 is in slash notation "24".
Now, in order to use the relay as proxy, on every computer from your local network, after you start the tor bundle, go to tor button settings from firefox toolbar (the green onion). Select use custom proxy settings and on on SOCKS host fill up your DS IP and the port you configured (9100 in my case). Test settings button will confirm your success. This step is needed only once, next time you start the bundle the Vidalia will not show itself anymore, instead, the firefox will start directly and you are ready to go with tor.
Tor Relay / Config File Editor
http://ggteknikus.tk/sspks/
DS211j

niewiesznic
Knowledgeable
Knowledgeable
Posts: 321
Joined: Fri Mar 26, 2010 12:52 am

Re: Tor Relay - Online anonimity - a new syno package

Unread post by niewiesznic » Mon Sep 09, 2013 3:29 pm

HI!
It is working! :) EXCELLENT!
Can You please add GUI/option settings panel accessible from main menu.
Right know if I want to change settings (like bandwith), I need to reinstall every time once again.
Regards,
niewiesznic
_________________________________________
DS1515+, Cisco SLM2008, Squeezebox Classic and Squeezebox Boom.

cfuttrup
Virtuoso
Virtuoso
Posts: 1339
Joined: Fri May 09, 2008 8:01 pm
Location: Denmark
Contact:

Re: Tor Relay - Online anonimity - a new syno package

Unread post by cfuttrup » Wed Sep 11, 2013 8:08 pm

+1 (I'm chiming in here because I'm interested in this thread and would like it to show up in "your post").
/Claus

User avatar
BakedPizza
Apprentice
Apprentice
Posts: 94
Joined: Sun Dec 09, 2012 12:19 am
Location: localhost

Re: Tor Relay - Online anonimity - a new syno package

Unread post by BakedPizza » Sat Sep 14, 2013 4:05 pm

I'm glad for the opportunity to contribute... Thanks for doing this!

Sadly I can't get it running as a non-exit relay (DS712+ - x86 - DSM 4.3-3776 - torelay-x86-0.2.3.25-011.spk). I've tried many random port numbers, but I'm always receiving the "Failed to run the package service" error. Is there a way to debug this?

//edit: Sorry, didn't read the last part in the TS about the shared libraries error. That's the exact error I'm facing. I will shut up now. :oops:
My DSM 6.0-6.1 VPN check-reconnect script can be found here: https://github.com/DcR-NL/synology-vpn-reconnect
[DS713+ & DX213 w/ 3x3.0TB (SHR) & 1.5TB & 4GB DDR3-1333 (most recent stable DSM)]

User avatar
BakedPizza
Apprentice
Apprentice
Posts: 94
Joined: Sun Dec 09, 2012 12:19 am
Location: localhost

Tor Relay on x86 Synology NAS How-To

Unread post by BakedPizza » Sat Sep 14, 2013 9:13 pm

OK, couldn't just stop there. Just got the relay to work on my x86 DS712+ without IPKG! Tried the proxy and it's fully working. Thanks again Gigix, for the SPK. :D
Log entry:

Code: Select all

Sep 14 21:45:40.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Sep 14 21:45:40.000 [notice] Bootstrapped 100%: Done.
Sep 14 21:45:40.000 [notice] Now checking whether ORPort x.x.x.x:xxxx and DirPort x.x.x.x:xxxx are reachable... (this may take up to 20 minutes -- look for log messages indicating success)
Sep 14 21:47:11.000 [notice] Self-testing indicates your DirPort is reachable from the outside. Excellent.
Sep 14 21:51:27.000 [notice] Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
Just in case more people would like to accomplish this, this is what I've done:
  1. Download the GCC package (which contains the missing shared library):

    Code: Select all

    http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/stable/gcc_4.2.1-5_i686.ipk
  2. Store the downloaded gcc_4.2.1-5_i686.ipk somewhere on your NAS.
  3. Start a SSH session.
  4. Extract the gcc_4.2.1-5_i686.ipk package. Type:

    Code: Select all

    tar xvzf gcc_4.2.1-5_i686.ipk
  5. Extract the data.tar.gz (it's one of the 3 files inside inside gcc_4.2.1-5_i686.ipk). Type:

    Code: Select all

    tar xvzf data.tar.gz
  6. Copy the extracted libssp.so.0 file to /lib/. Type:

    Code: Select all

    cp ./opt/lib/libssp.so.0 /lib/libssp.so.0
  7. Download the x86 .spk from here: http://ggteknikus.tk/
  8. Install the .spk from the Package Center and follow the instructions.
  9. Have fun browsing!
//edit:

Code: Select all

Sep 15 15:43:14.000 [notice] Heartbeat: Tor's uptime is 18:00 hours, with 59 circuits open. I've sent 705.62 MB and received 624.00 MB.
8)
My DSM 6.0-6.1 VPN check-reconnect script can be found here: https://github.com/DcR-NL/synology-vpn-reconnect
[DS713+ & DX213 w/ 3x3.0TB (SHR) & 1.5TB & 4GB DDR3-1333 (most recent stable DSM)]

Gigix
Beginner
Beginner
Posts: 22
Joined: Sun Jan 29, 2012 8:15 pm

Re: Tor Relay - Online anonimity - a new syno package

Unread post by Gigix » Sun Sep 15, 2013 10:21 pm

BakedPizza wrote:Sadly I can't get it running as a non-exit relay (DS712+ - x86 - DSM 4.3-3776 - torelay-x86-0.2.3.25-011.spk). I've tried many random port numbers, but I'm always receiving the "Failed to run the package service" error. Is there a way to debug this?
Yes, I know about the problem and luckily the new version have good binaries for all platforms.
The new version should also upgrade smothly, without the need of uninstall and install.
Do a manual upgrade (I don't have a repository yet) with the file from the same http://ggteknikus.tk/


Thanks everyone for feedback!
Tor Relay / Config File Editor
http://ggteknikus.tk/sspks/
DS211j

enigmaUK
I'm New!
I'm New!
Posts: 8
Joined: Sat Jun 22, 2013 7:22 pm

Re: Tor Relay - Online anonimity - a new syno package

Unread post by enigmaUK » Sat Oct 12, 2013 11:12 am

Might seem obvious to some but how do you choose the correct package for your station. For example I have a DS2413+ and also a DS1511+. Which is the correct package for each of those and how do you identify them?

Cheers Pete

niewiesznic
Knowledgeable
Knowledgeable
Posts: 321
Joined: Fri Mar 26, 2010 12:52 am

Re: Tor Relay - Online anonimity - a new syno package

Unread post by niewiesznic » Sat Oct 12, 2013 11:58 am

It's simple. http://forum.synology.com/wiki/index.ph ... y_NAS_have

Edit:
For those that want to use TOR on iOS devices, simple and working solution.

http://snipplr.com/view/16563/how-to-co ... pod-touch/
Regards,
niewiesznic
_________________________________________
DS1515+, Cisco SLM2008, Squeezebox Classic and Squeezebox Boom.

enigmaUK
I'm New!
I'm New!
Posts: 8
Joined: Sat Jun 22, 2013 7:22 pm

Re: Tor Relay - Online anonimity - a new syno package

Unread post by enigmaUK » Sat Oct 12, 2013 2:24 pm

Many thanks, I can correctly identify the package for the 2413+ now but am still unsure what the DS1512+ should use.

Regards Pete

User avatar
BakedPizza
Apprentice
Apprentice
Posts: 94
Joined: Sun Dec 09, 2012 12:19 am
Location: localhost

Re: Tor Relay - Online anonimity - a new syno package

Unread post by BakedPizza » Sat Oct 12, 2013 2:26 pm

enigmaUK wrote:Many thanks, I can correctly identify the package for the 2413+ now but am still unsure what the DS1512+ should use.

Regards Pete
It's there on the same Wiki page. DS1512+ = x86
My DSM 6.0-6.1 VPN check-reconnect script can be found here: https://github.com/DcR-NL/synology-vpn-reconnect
[DS713+ & DX213 w/ 3x3.0TB (SHR) & 1.5TB & 4GB DDR3-1333 (most recent stable DSM)]

niewiesznic
Knowledgeable
Knowledgeable
Posts: 321
Joined: Fri Mar 26, 2010 12:52 am

Re: Tor Relay - Online anonimity - a new syno package

Unread post by niewiesznic » Sat Oct 12, 2013 2:30 pm

Regards,
niewiesznic
_________________________________________
DS1515+, Cisco SLM2008, Squeezebox Classic and Squeezebox Boom.

Post Reply

Return to “Third-party Packages”