Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Help with setting up a TOR Middle relay
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Help with setting up a TOR Middle relay

Hey,

I have some idle low end VPS and I would like to use it as tor middle relay. I searched for some how to's and I found this:

http://cavebeat.blogspot.de/2012/11/raspberry-pi-tor-middle-relay.html

I did all the steps and in my log file it says:

Tor has successfully opened a circuit. Looks like client functionality is working.

The author says that I could check my server at tor status pages. I found this one:
<br
wwww.torstatus.blutmagie.de/index.php

My questions:

I set up a nickname is this the router name from wwww.torstatus.blutmagie.de/index.php ?
And how can I set up a monthly bandwidth limit? In the configuration file it says:

## Set a maximum of 4 gigabytes each way per period.
#AccountingMax 4 GB
## Each period starts daily at midnight (AccountingMax is per day)
#AccountingStart day 00:00
## Each period starts on the 3rd of the month at 15:00 (AccountingMax
## is per month)
#AccountingStart month 3 15:00

When I would like to set a monthly limit of 10GB and I want it to be reset on the 1th of the month at 15.00, are this the right settings?

    ## Set a maximum of 4 gigabytes each way per period.
    AccountingMax 10 GB
    ## Each period starts daily at midnight (AccountingMax is per day)
    #AccountingStart day 00:00
    ## Each period starts on the 3rd of the month at 15:00 (AccountingMax
    ## is per month)<
    AccountingStart month 1 15:00

Thanks for your help in advance!

Comments

  • trexostrexos Member
    edited August 2013

    Btw has anybody tested to run TOR with NATed IPv4?
    Is there a option where I can set up the IP?

  • MaouniqueMaounique Host Rep, Veteran

    I recommend setting a bw limit rather than accounting limit. If you do accounting limit and the server goes over that, will go sleeping and the established connections will be broken, the router will need to establish trust again in the network for it to get traffic.

    As for the NAT-ed part, it is working ONLY if you can port forwarding. If you have some port range forwarded automatically to you, you can still pick 2 ports from within that range, however, it is best to use 80 and 443 to allow ppl behind restrictive firewalls to connect to you.

  • trexostrexos Member
    edited August 2013

    Can you explain me how to set up this better bw limit?

    I can portforward but it doesn't recognize the right IPv4 (one number is false, don't know why).

    That means set OrPort and DirPort to 80 or 443?

    Another question: How long does it take until the first traffic is routed over my middle relay and I see it on SolusVM?

  • MaouniqueMaounique Host Rep, Veteran

    There is a setting dealing with bw, it is counted in kbps. You can setup, for example, 100kbps for regular traffic but allow bursts for as high as 200kbps.
    You can setup IP manually.
    It is somewhat unknown how long will it take. From my experience, it varies on many factors because it is based on some kind of reputation system, if your router has been there before and for a long time, will pick up pretty soon, if it is new, only big servers will probe it for a while before saying it is trustworthy enough to the rest of the network. It might be 12 hours till real traffic passes through, traffic will also be lower than the max you allow at least for a while. Stable servers will go close to capacity, but that means weeks of uptime. From what I see, middle relays are no longer so sought after like a couple of years ago.

  • perennateperennate Member, Host Rep
    edited August 2013

    Bandwidth limit - if you only want 10 GB / month, that is equivalent to 4 KB/s. Actually that's less than the minimum bandwidth, so you might want to increase your bandwidth allocation for Tor, at least 20 KB/s according to configuration file.

    Nickname - yes, that's the router name displayed on that page.

    "one number is false" - ?

    OrPort, DirPort - you can set that to any port you want.

    Traffic - maybe an hour or so. Won't reach capacity until a few days.

  • saltsporksaltspork Member
    edited August 2013

    Regarding NAT-ed, I assume you're meaning LowEndSpirit. Make sure to keep the bandwidth limit down otherwise your CPU usage could be an issue. My LES torrc

    Nickname nodeNameGG
    ExitPolicy reject *:*
    ORPort 6901
     # based on your local IP, refer to signup email
    Address 12.34.56.78
     # 213.163.67.24 for NL and 149.255.100.108 for UK
    RelayBandwidthRate 1 MB # keep it low
    RelayBandwidthBurst 12 MB
    AccountingMax 200 GB
     # This limit applies the greatest of in and outbound traffic. If provider meters in + out traffic then 200GB = 400GB
    AccountingStart month 28 00:00
     # Doesn't matter that much, based on signup date.
    

    Check that things are well with

    sudo tail /var/log/tor/log -n 20
    

    It'll self-test reachability.

  • rm_rm_ IPv6 Advocate, Veteran
    edited August 2013

    set a monthly limit of 10GB

    FYI this is not just nothing, this is almost less than nothing. I would not advice anyone to even bother setting up a relay if you have less than ~500GB of bandwidth a month. 10GB is something each of [my good friend's] six Tor nodes burn in 30 minutes, not a month.

  • On the bright side, with 10GB BW, you could run a bridge. Running a relay isn't all too bright a idea either way.

  • @Maounique

    Ok so I should set up the BW limit with the speed limit? What is the difference betweeen RelayBandwidthRate and RelayBandwidthBurst?

    @perennate said:
    Bandwidth limit - if you only want 10 GB / month, that is equivalent to 4 KB/s. Actually that's less than the minimum bandwidth, so you might want to increase your bandwidth allocation for Tor, at least 20 KB/s according to configuration file.

    How can I calculate that?

    "one number is false" - ?

    I mean one number of the IP which it says on the logfile is false :(
    >

    OrPort, DirPort - you can set that to any port you want.

    But it's better to set them at 80 and 443 right?

    @saltspork Yes, I mean LES. So under Address you write the EXTERNAL IP right?

    @rm_ 10GB was just a placeholder, I have 500GB traffic :)

    @darknyan Thanks, maybe I'll try to set up a bridge too. Is this something like a unlisted entry relay?

  • perennateperennate Member, Host Rep

    Ok so I should set up the BW limit with the speed limit? What is the difference betweeen RelayBandwidthRate and RelayBandwidthBurst?

    If you have 500 GB of summed incoming/outgoing traffic, then you have 250 GB traffic for each, so that comes to 100 KB/s. So set the RelayBandwidthRate to 100 KB/s and RelayBandwidthBurst to 150 KB/s or something like that.

    How can I calculate that?

    Math. (500 GB/month = 50010001000 KB/month = 50010001000/3600/24/30 KB/s)

    OrPort, DirPort - you can set that to any port you want. But it's better to set them at 80 and 443 right?

    It doesn't really matter. If you want maximum accessibility then set to those. Although if your server is NAT'd then don't bother trying to set up those ports, because it's not needed.

    Yes, I mean LES. So under Address you write the EXTERNAL IP right?

    Yep.

    Thanks, maybe I'll try to set up a bridge too. Is this something like a unlisted entry relay?

    Yep.

    Thanked by 1trexos
  • NeoonNeoon Community Contributor, Veteran
    edited August 2013

    In and Out when you have 500GB would be 8GB per Day if you have lower then 3TB set 1Mb bandwith limit.

  • @perennate

    Thanks for your anwsers :)

    RelayBandwidthBurst means that if I have enough traffic left it can burst the connection to 150KB/s, is that right? Is it possible that because of the Burst it uses more than the maximal bandwidth (500GB)?

    And I don't get your calculation.
    500GB/month are 524 288 000 KB/month
    And now I have to divide /3600 (seconds in a hour) /24 (hours a day) /30 (days a month).

    So I receive ~ 202 KB/s. Now you said that it's ingoing and outgoing. Do I have to divide the result again because it uses 101KB/s for in and out going, so it's 2 times 101? 202KB/s:2 = 101KB/s. That would suit.

    @Infinity580 said:
    In and Out when you have 500GB would be 8GB per Day if you have lower then 3TB set 1Mb bandwith limit.

    But that's a lot more than my 101KB/s? Sorry, don't really get it.

  • perennateperennate Member, Host Rep

    RelayBandwidthBurst means that if I have enough traffic left it can burst the connection to 150KB/s, is that right? Is it possible that because of the Burst it uses more than the maximal bandwidth (500GB)?

    No, RelayBandwidthBurst will let it burst to the bandwidth you set but not maintain it for long, as the name implies. Not sure how it's implemented though, but Tor is open source.

    500GB/month are 524 288 000 KB/month

    1024 is close to 1000. Probably some providers use the latter to save bandwidth.

    And now I have to divide /3600 (seconds in a hour) /24 (hours a day) /30 (days a month).

    Indeed..

    So I receive ~ 202 KB/s. Now you said that it's ingoing and outgoing. Do I have to divide the result again because it uses 101KB/s for in and out going, so it's 2 times 101? 202KB/s:2 = 101KB/s. That would suit.

    Depends on whether you get 500 GB incoming/outgoing averaged or 500 GB incoming/outgoing summed, or something else.

    But that's a lot more than my 101KB/s? Sorry, don't really get it.

    One megabit per second is (1/8) megabytes per second, which is 128 KB/s.

  • NeoonNeoon Community Contributor, Veteran

    To slow bandwidth limitation is not good for the Tor Network, better would be 1Mb +


    I have my Relays at least 1MB/s if i have now 256GB or 2TB

  • @perennate

    I have 500GB for incoming and outgoing. When I want to calculate how much bandwidth I need I have to calculate with two times the RelayBandwidthRate because for incoming and outcoming right? So if RelayBandwidthRate is 100KB/s it's 200KB/s when it's full used?

    @Infinity580 I won't go under 100KB/s. Do you mean 1Megabyte per second?

  • NeoonNeoon Community Contributor, Veteran

    1MB/s per second yes better would be without bandwith limit and only with Month/Daily limit.

  • trexostrexos Member
    edited August 2013

    So with this settings? But ealier they said a speed limit would be better.

     ## Set a maximum of 4 gigabytes each way per period.
        AccountingMax 10 GB
        ## Each period starts daily at midnight (AccountingMax is per day)
        #AccountingStart day 00:00
        ## Each period starts on the 3rd of the month at 15:00 (AccountingMax
        ## is per month)<
        AccountingStart month 1 15:00
    
  • NeoonNeoon Community Contributor, Veteran
    edited August 2013

    SocksPort 9050 # what port to open for local application connections

    SocksListenAddress 127.0.0.1 # accept connections only from localhost

    SocksPolicy accept 192.168.0.0/16

    SocksPolicy reject *

    RunAsDaemon 1

    DataDirectory /var/lib/tor

    ControlPort 9051

    ORPort 9001

    Nickname name

    RelayBandwidthRate 1024 KB # Throttle traffic to 100KB/s (800Kbps)

    AccountingMax 8 GB

    AccountingStart day 00:00

    ContactInfo [email protected]

    ExitPolicy reject : # no exits allowed

    Thats my default config for 500GB per Month

  • But Maounique said this:

    @Maounique said:
    I recommend setting a bw limit rather than accounting limit. If you do accounting limit and the server goes over that, will go sleeping and the established connections will be broken, the router will need to establish trust again in the network for it to get traffic.

    Is this true or not?

  • xsetxset Member

    guys, why do you run tor?

  • I like the concept of TOR and I have to VPS idling, so why not support this project?

  • xsetxset Member

    @trexos aren't you afraid that some bad traffic will go through it and you will be held responsible for it?

  • NeoonNeoon Community Contributor, Veteran
    edited August 2013

    You dont, because its a relay not exit.

  • trexostrexos Member
    edited August 2013

    No, I'm just a middle relay which receives traffic from an other middle relay or an entry relay and sends it to another middle relay or to an exit relay. As I read it's just "dangerous" to run an exit relay because the target receives your IP. Here is a good explanation: https://www.eff.org/torchallenge/what-is-tor

    @Infinity580 Thanks for the two screenshots. I'll set it to 1024KB and 500GB each month, as the 2nd screenshot said that should run smoother.

    Thanked by 1rm_
  • MaouniqueMaounique Host Rep, Veteran
    edited August 2013

    I said that a bw limit is better for a few reasons:
    1. Your relay is always there, established specialized exits are using it after a while, if it comes and goes, not many routes will go over it;
    2. 500 GB is rather low for today, a few years ago, I was accepting this as the lowest limit, but today 1 TB is more like it. I push at home some 30 TB a month with minimal exit ports;

    So, my recommendation was for higher traffic. In your case, maybe offering a bridge is better, will allow ppl in countries where tor is blocked to access it at least for a while.

  • NeoonNeoon Community Contributor, Veteran
    edited August 2013

    @Maounique 1. Not realy.... i had Relay at RamNode with arround 200kb/s it was everytime online yes but no one used it. After i changed to 1024kb/s its under high load. Traffic was empty after 5 Hours

Sign In or Register to comment.