I want to run an open Tor router.
My exit policy will be similar to ReducedExitPolicy.
But I also want to make it hard for the tor network to abuse my resources.
Cases I want to prevent clients from doing via Tor:
- Hammering one site with very many packets.
- Aggresive netscans of whole IP blocks
Cases I do NOT want to prevent clients from doing via Tor:
- uploading a few hudreds of image files to the cloud
- seeding a torrent
My question is, can this be done at all, and how?
My first thought was some firewall (Linux/iptables or *BSD/ipfw/pf) - but this will probably be useless due to inherent properties of the Onion router.
Is there any ongoing torproject team development on this topic?
I also ask for general hints on securing Tor exit nodes.
Update (Sep 2012)
From helpful answers and some other research I think this can not be done.
The best you can do to stop people from abusing exit node to contribute in DDOS, is to detect very frequent packets directed to one IP.
The "very frequent" threshold depends on total node bandwidth... If it is wrong, there will be false positives, blocking legitimate traffic of realtime TCP apps and traffic sourced from very many clients to one destination.