|
|
= Preventing (almost all) Bittorrent Activity on an Exit Node =
|
|
|
# Preventing (almost all) Bittorrent Activity on an Exit Node
|
|
|
|
|
|
'''DO NOT ACTUALLY USE THIS. IT HURTS THE TOR NETWORK.''' Use the [wiki:doc/ReducedExitPolicy Reduced Exit Policy] instead if you want to reduce Bittorrent traffic exiting at your relay (or, even better, live with the DMCA complaints). See https://lists.torproject.org/pipermail/tor-relays/2013-April/002047.html for a discussion about this topic.
|
|
|
**DO NOT ACTUALLY USE THIS. IT HURTS THE TOR NETWORK.** Use the [Reduced Exit Policy](./doc/ReducedExitPolicy) instead if you want to reduce Bittorrent traffic exiting at your relay (or, even better, live with the DMCA complaints). See https://lists.torproject.org/pipermail/tor-relays/2013-April/002047.html for a discussion about this topic.
|
|
|
|
|
|
For anyone who runs a Tor exit node on a Linux machine, the following one-liner blocks via IPTables all* Trackers:
|
|
|
|
|
|
{{{
|
|
|
```
|
|
|
for j in `for a in $(wget -qO- http://www.trackon.org/api/all | awk -F/ ' { print $3 }' ); do dig +short a $a; done |grep -v [a-z]|sort|uniq`; do iptables -I OUTPUT -d $j -j DROP; done
|
|
|
}}}
|
|
|
```
|
|
|
If you do not have any custom IPTables rules, you may want to prefix this with
|
|
|
|
|
|
{{{
|
|
|
```
|
|
|
iptables --flush OUTPUT;
|
|
|
}}}
|
|
|
```
|
|
|
and then have the full one-liner within your crontab to run hourly to ensure that your block lists are kept up to date as possible. To do this:
|
|
|
|
|
|
{{{
|
|
|
```
|
|
|
crontab -e
|
|
|
}}}
|
|
|
```
|
|
|
and enter the line:
|
|
|
|
|
|
{{{
|
|
|
```
|
|
|
0 * * * * iptables --flush OUTPUT;for j in `for a in $(wget -qO- http://www.trackon.org/api/all | awk -F/ ' { print $3 }' ); do dig +short a $a; done |grep -v [a-z]|sort|uniq`; do iptables -I OUTPUT -d $j -j DROP; done
|
|
|
}}}
|
|
|
```
|
|
|
and then save it. If vi, (esc):x(enter)
|
|
|
|
|
|
This is a very rough solution to preventing tracker access, certainly for me it has cut down on abuse complaints.
|
... | ... | |