Delivery-Date: Sun, 07 Dec 2014 07:42:33 -0500
Return-Path: <tor-talk-bounces@lists.torproject.org>
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on moria.seul.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	PLING_QUERY,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,
	UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham version=3.3.1
X-Original-To: archiver@seul.org
Delivered-To: archiver@seul.org
Received: from eugeni.torproject.org (eugeni.torproject.org [38.229.72.13])
	(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by khazad-dum.seul.org (Postfix) with ESMTPS id C1A861E0349;
	Sun,  7 Dec 2014 07:42:31 -0500 (EST)
Received: from eugeni.torproject.org (localhost [127.0.0.1])
	by eugeni.torproject.org (Postfix) with ESMTP id A74BD31E0E;
	Sun,  7 Dec 2014 12:42:27 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by eugeni.torproject.org (Postfix) with ESMTP id D0D8C31E08
 for <tor-talk@lists.torproject.org>; Sun,  7 Dec 2014 12:42:23 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at 
Received: from eugeni.torproject.org ([127.0.0.1])
 by localhost (eugeni.torproject.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id PPk2nIBNcpqu for <tor-talk@lists.torproject.org>;
 Sun,  7 Dec 2014 12:42:23 +0000 (UTC)
Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified))
 by eugeni.torproject.org (Postfix) with ESMTPS id 9DE8D31E03
 for <tor-talk@lists.torproject.org>; Sun,  7 Dec 2014 12:42:23 +0000 (UTC)
Received: from plantcutter.riseup.net (plantcutter-pn.riseup.net [10.0.1.121])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK))
 by mx1.riseup.net (Postfix) with ESMTPS id D76F34119D
 for <tor-talk@lists.torproject.org>; Sun,  7 Dec 2014 12:42:20 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1417956140; bh=uuPcJCMRkV/U786BdmO8Zkzj7oECg8k7GvvcHTXAgFU=;
 h=Date:From:To:Subject:References:In-Reply-To:From;
 b=CYV9/CBirtQNSYdmarBlNaUXcQOvvzHrODnZ7TX++5xBgExNi14Tprk4f+/p6HbPv
 GK7tJuOCe2uvoz+kRNoHFdz2m9pI+Epw3LC6AXKmWF1xqIjJhQNJ2C8cVUgQFaEY2S
 lYayofMo40qAcdxFYUFpqTn3wefIVG2n0BEeWBbI=
Received: from [127.0.0.1] (localhost [127.0.0.1])
 (Authenticated sender: cyrus_the_great) with ESMTPSA id A508C208C9
Message-ID: <54844B21.6000608@riseup.net>
Date: Sun, 07 Dec 2014 12:42:09 +0000
From: Cyrus <cyrus_the_great@riseup.net>
MIME-Version: 1.0
To: tor-talk@lists.torproject.org
References: <d44c9fb94badc9743f9491dc11db52c0@ruggedinbox.com>
 <b89ce16e0c471d6df1c8a007f9a2a1fb@ruggedinbox.com>
In-Reply-To: <b89ce16e0c471d6df1c8a007f9a2a1fb@ruggedinbox.com>
X-Virus-Scanned: clamav-milter 0.98.4 at mx1
X-Virus-Status: Clean
Subject: Re: [tor-talk] (D)DOS over Tor network ? Help !
X-BeenThere: tor-talk@lists.torproject.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: tor-talk@lists.torproject.org
List-Id: "all discussion about theory, design,
 and development of Onion Routing" <tor-talk.lists.torproject.org>
List-Unsubscribe: <https://lists.torproject.org/cgi-bin/mailman/options/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=unsubscribe>
List-Archive: <http://lists.torproject.org/pipermail/tor-talk/>
List-Post: <mailto:tor-talk@lists.torproject.org>
List-Help: <mailto:tor-talk-request@lists.torproject.org?subject=help>
List-Subscribe: <https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: tor-talk-bounces@lists.torproject.org
Sender: "tor-talk" <tor-talk-bounces@lists.torproject.org>

It was much easier to start running every hidden service as a separate
process. I did it with this lazy bash script, after moving all the
hidden services into a folder called called /var/lib/tor/auto and
creatinv configs in /etc/tor/users from a template called
/etc/tor/torrc-unique - that template has values called %PORT% and %USER%

I will improve the shell script so it is also an interface to add new
hidden services, and stop old ones by name only.

#!/bin/bash

p="10000"

cd /var/lib/tor/auto
find * -type d | while read d; do
        cp /etc/tor/torrc-unique /etc/tor/users/torrc-$d
        sed -i "s/%USER%/$d/g" /etc/tor/users/torrc-$d
        sed -i "s/%PORT%/$p/g" /etc/tor/users/torrc-$d
        p=`expr $p + 1`
        echo "HiddenServiceDir /var/lib/tor/auto/$d" >>
/etc/tor/users/torrc-$d
        echo "HiddenServicePort 80 192.168.0.3:80" >>
/etc/tor/users/torrc-$d
        echo "HiddenServicePort 22 192.168.0.3:22" >>
/etc/tor/users/torrc-$d
        tor --RunAsDaemon 1 -f /etc/tor/users/torrc-$d
done

fuckyouhosting@ruggedinbox.com wrote:
> On 2014-12-01 01:46, fuckyouhosting@ruggedinbox.com wrote:
>> Hi List! We (try to) maintain a free hosting platform for hidden
>> service websites, here: http://fuckyouhotwkd3xh.onion
>> but recently all the hosted hidden services became unreachable.
>>
>> Tor logs are correctly reporting the problem:
>>
>> Dec 01 XXX [notice] Your Guard SoylentGreen (XXX) is failing more
>> circuits than usual. Most likely this means the Tor network is
>> overloaded. Success counts are 147/210. Use counts are 86/86. 147
>> circuits completed, 0 were unusable, 1 collapsed, and 1000 timed out.
>> For reference, your timeout cutoff is 60 seconds.
>>
>> Dec 01 XXX [notice] Your Guard regar42 (XXX) is failing more circuits
>> than usual. Most likely this means the Tor network is overloaded.
>> Success counts are 122/178. Use counts are 91/92. 137 circuits
>> completed, 15 were unusable, 0 collapsed, and 17 timed out. For
>> reference, your timeout cutoff is 113 seconds.
>>
>> ...
>>
>> trying to change the Guard, by deleting the /var/lib/tor/state file,
>> results in the same problem and logs, just with a different Guard.
>>
>> Trying to host just our hidden service (fuckyouhotwkd3xh.onion),
>> by deleting all the other hidden services in the torrc file,
>> 'solves' the problem .. logs looks ok and the service is reachable.
>>
>> It looks like we are hosting an 'offending' hidden service
>> which is the target of a (D)DOS attack.
>>
>> We tried to enable Tor debugging and to sniff some traffic
>> but were unable to find the offending hidden service.
>>
>> All the access.log and error.log of the hosted websites are ok,
>> they don't grow in size and don't log any flood.
>>
>> Even the bandwidth usage of the server looks ok, basically there is no
>> traffic.
>>
>>
>> So .. question: is there a way to understand which hidden service is
>> causing all this ?
>>
>> Suggestions are welcome!
>>
>> Thank you.
> 
> Hi again, it looks like we are in good company:
> https://lists.torproject.org/pipermail/tor-talk/2014-November/035787.html (Isolating
> a hidden service hit by DDOS)
> sorry for not noticing that before, we'll try to follow the same advises.

-- 
CYRUSERV Onionland Hosting: http://cyruservvvklto2l.onion/
PGP public key: http://cyruservvvklto2l.onion/contact
This email is just for mailing lists and private correspondence.
Please use cyrus_the_great@lelantos.org for business inquiries.
-- 
tor-talk mailing list - tor-talk@lists.torproject.org
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk

