From e8b6095354e6c90175341be34a915c00c675c57a Mon Sep 17 00:00:00 2001 From: Matthieu Saulnier Date: Wed, 17 Dec 2014 16:06:54 +0100 Subject: Add transparent policy for tor relay Update domain zone Deploy HTML page for tor exit notice Add firewalld task to open listening ports Add Address in tor conf matching IP reverse DNS Remove cozycloud in site.yml because didn't work on Fedora --- roles/torrelay/files/tor-exit-notice.html | 144 ++++++++++++++++++++++++++++++ roles/torrelay/tasks/main.yml | 14 +++ roles/torrelay/templates/torrc | 2 + 3 files changed, 160 insertions(+) create mode 100644 roles/torrelay/files/tor-exit-notice.html (limited to 'roles/torrelay') diff --git a/roles/torrelay/files/tor-exit-notice.html b/roles/torrelay/files/tor-exit-notice.html new file mode 100644 index 0000000..8cf5c29 --- /dev/null +++ b/roles/torrelay/files/tor-exit-notice.html @@ -0,0 +1,144 @@ + + + + + +This is a Tor Exit Router + + + + + + +

This is a +Tor Exit Router

+ +

+Most likely you are accessing this website because you had some issue with +the traffic coming from this IP. This router is part of the Tor Anonymity Network, which is +dedicated to providing +privacy to people who need it most: average computer users. This +router IP should be generating no other traffic, unless it has been +compromised.

+ + + + +

+ +How Tor works +

+ +

+Tor sees use by many +important segments of the population, including whistle blowers, +journalists, Chinese dissidents skirting the Great Firewall and oppressive +censorship, abuse victims, stalker targets, the US military, and law +enforcement, just to name a few. While Tor is not designed for malicious +computer users, it is true that they can use the network for malicious ends. +In reality however, the actual amount of abuse is quite low. This +is largely because criminals and hackers have significantly better access to +privacy and anonymity than do the regular users whom they prey upon. Criminals +can and do build, +sell, and trade far larger and more +powerful networks than Tor on a daily basis. Thus, in the mind of this +operator, the social need for easily accessible censorship-resistant private, +anonymous communication trumps the risk of unskilled bad actors, who are +almost always more easily uncovered by traditional police work than by +extensive monitoring and surveillance anyway.

+ +

+In terms of applicable law, the best way to understand Tor is to consider it a +network of routers operating as common carriers, much like the Internet +backbone. However, unlike the Internet backbone routers, Tor routers +explicitly do not contain identifiable routing information about the source of +a packet, and no single Tor node can determine both the origin and destination +of a given transmission.

+ +

+As such, there is little the operator of this router can do to help you track +the connection further. This router maintains no logs of any of the Tor +traffic, so there is little that can be done to trace either legitimate or +illegitimate traffic (or to filter one from the other). Attempts to +seize this router will accomplish nothing.

+ + + +

+Furthermore, this machine also serves as a carrier of email, which means that +its contents are further protected under the ECPA. 18 +USC 2707 explicitly allows for civil remedies ($1000/account +plus legal fees) +in the event of a seizure executed without good faith or probable cause (it +should be clear at this point that traffic with an originating IP address of +FIXME_DNS_NAME should not constitute probable cause to seize the +machine). Similar considerations exist for 1st amendment content on this +machine.

+ + + +

+If you are a representative of a company who feels that this router is being +used to violate the DMCA, please be aware that this machine does not host or +contain any illegal content. Also be aware that network infrastructure +maintainers are not liable for the type of content that passes over their +equipment, in accordance with DMCA +"safe harbor" provisions. In other words, you will have just as much luck +sending a takedown notice to the Internet backbone providers. Please consult +EFF's prepared +response for more information on this matter.

+ +

For more information, please consult the following documentation:

+ +
    +
  1. Tor Overview
  2. +
  3. Tor Abuse FAQ
  4. +
  5. Tor Legal FAQ
  6. +
+ +

+That being said, if you still have a complaint about the router, you may +email the maintainer. If +complaints are related to a particular service that is being abused, I will +consider removing that service from my exit policy, which would prevent my +router from allowing that traffic to exit through it. I can only do this on an +IP+destination port basis, however. Common P2P ports are +already blocked.

+ +

+You also have the option of blocking this IP address and others on +the Tor network if you so desire. The Tor project provides a web service +to fetch a list of all IP addresses of Tor exit nodes that allow exiting to a +specified IP:port combination, and an official DNSRBL is also available to +determine if a given IP address is actually a Tor exit server. Please +be considerate +when using these options. It would be unfortunate to deny all Tor users access +to your site indefinitely simply because of a few bad apples.

+ + + diff --git a/roles/torrelay/tasks/main.yml b/roles/torrelay/tasks/main.yml index 8a8fdda..b9d4c91 100644 --- a/roles/torrelay/tasks/main.yml +++ b/roles/torrelay/tasks/main.yml @@ -6,6 +6,13 @@ yum: name=tor state=present when: ansible_distribution == "Fedora" +- name: Création des répertoires de base + file: path=/usr/local/share/tor state=directory + +- name: Installation de la page d'accueil html + copy: src=tor-exit-notice.html dest=/usr/local/share/tor/tor-exit-notice.html + mode=644 + - name: Configuration du service template: src=torrc dest=/etc/tor/torrc owner=root @@ -13,5 +20,12 @@ mode=644 notify: restart tor +- name: Ouverture des ports Firewalld + firewalld: port={{ item[0] }} permanent={{ item[1] }} state=enabled + with_nested: + - [ '9001/tcp', '9030/tcp' ] + - [ 'true', 'false' ] + when: ansible_distribution == "Fedora" + - name: Activation et démarrage du relai Tor service: name=tor state=started enabled=yes diff --git a/roles/torrelay/templates/torrc b/roles/torrelay/templates/torrc index 88e714a..a3d3d94 100644 --- a/roles/torrelay/templates/torrc +++ b/roles/torrelay/templates/torrc @@ -9,3 +9,5 @@ RelayBandwidthRate {{ bprate }} KB RelayBandwidthBurst {{ bpburst }} KB ContactInfo {{ contactinfo }} DirPort 9030 +Address tor-proxy-readme.casperlefantom.net +DirPortFrontPage /usr/local/share/tor/tor-exit-notice.html -- cgit