tor-doc-relay.html.en
上传用户:awang829
上传日期:2019-07-14
资源大小:2356k
文件大小:15k
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
- <html>
- <head>
- <title>Tor: Relay Configuration Instructions</title>
- <meta name="Author" content="Roger Dingledine">
- <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
- <link rel="stylesheet" type="text/css" href="../stylesheet-ltr.css">
- <link rel="shortcut icon" type="image/x-icon" href="../favicon.ico">
- </head>
- <body>
- <div class="center">
- <table class="banner" border="0" cellpadding="0" cellspacing="0" summary="">
- <tr>
- <td class="banner-left"><a href="https://www.torproject.org/"><img src="../images/top-left.png" alt="Click to go to home page" width="193" height="79"></a></td>
- <td class="banner-middle">
- <a href="../index.html.en">Home</a>
- <a href="../overview.html.en">Overview</a>
- <a href="../easy-download.html.en">Download</a>
- <a href="../documentation.html.en">Docs</a>
- <a href="../volunteer.html.en">Volunteer</a>
- <a href="../people.html.en">People</a>
- <a href="https://blog.torproject.org/">Blog</a>
- <a href="../donate.html.en">Donate!</a>
- </td>
- <td class="banner-right">
- <a href="tor-doc-relay.html.de"><acronym title="Deutsch"><img src="../images/de.png" alt="Deutsch" width="24" height="16"></acronym></a> <acronym title="English"><img src="../images/en.png" alt="English" width="24" height="16"></acronym> <a href="tor-doc-relay.html.es"><acronym title="español"><img src="../images/es.png" alt="español" width="24" height="16"></acronym></a> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <a href="tor-doc-relay.html.fr"><acronym title="français"><img src="../images/fr.png" alt="français" width="24" height="16"></acronym></a> <a href="tor-doc-relay.html.it"><acronym title="Italiano"><img src="../images/it.png" alt="Italiano" width="24" height="16"></acronym></a> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <a href="tor-doc-relay.html.ko"><acronym title="한국어 (Hangul)"><img src="../images/ko.png" alt="한국어 (Hangul)" width="24" height="16"></acronym></a> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <a href="tor-doc-relay.html.pl"><acronym title="polski"><img src="../images/pl.png" alt="polski" width="24" height="16"></acronym></a> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <a href="tor-doc-relay.html.ru"><acronym title="Русский (Russkij)"><img src="../images/ru.png" alt="Русский (Russkij)" width="24" height="16"></acronym></a> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <img src="../images/green-flagspace.png" alt="" width="24" height="16"> <a href="tor-doc-relay.html.zh-cn"><acronym title="中文(简) (Simplified Chinese)"><img src="../images/zh-cn.png" alt="中文(简) (Simplified Chinese)" width="24" height="16"></acronym></a>
- </td>
- </tr>
- </table>
- <div class="center">
- <div class="main-column">
- <h1>Configuring a Tor relay</h1>
- <!-- BEGIN SIDEBAR -->
- <div class="sidebar-left">
- <h3>Config Steps</h3>
- <ol>
- <li><a href="../docs/tor-doc-relay.html.en#install">Download & Install</a></li>
- <li><a href="../docs/tor-doc-relay.html.en#setup">Configuration</a></li>
- <li><a href="../docs/tor-doc-relay.html.en#check">Check & Confirm</a></li>
- <li><a href="../docs/tor-doc-relay.html.en#after">Final Steps</a></li>
- </ol>
- </div>
- <!-- END SIDEBAR -->
- <hr>
- <p>
- The Tor network relies on volunteers to donate bandwidth. The more
- people who run relays, the faster the Tor network will be. If you have
- at least 20 kilobytes/s each way, please help out Tor by configuring your
- Tor to be a relay too. We have many features that make Tor relays easy
- and convenient, including <a href="../faq.html.en#RelayFlexible">rate limiting
- for bandwidth, exit policies so you can limit your exposure to abuse
- complaints, and support for dynamic IP addresses</a>.
- </p>
- <p>You can run a Tor relay on <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#RelayOS">pretty
- much any</a> operating system, but Linux, FreeBSD 5.x+, OS X Tiger or
- later, and Windows Server 2003 or later work best.
- </p>
- <hr>
- <a id="zero"></a>
- <a id="install"></a>
- <h2><a class="anchor" href="#install">Step One: Download and Install Tor</a></h2>
- <br>
- <p>Before you start, you need to make sure that Tor is up and running.
- </p>
- <p>Visit our <a href="../easy-download.html.en">download page</a> and
- install the "Installation Bundle" for your OS.
- </p>
- <p>If it's convenient, you might also want to use it as a client for a
- while to make sure it's actually working.</p>
- <hr>
- <a id="setup"></a>
- <h2><a class="anchor" href="#setup">Step Two: Set it up as a relay</a></h2>
- <br>
- <ol>
- <li>Verify that your clock and timezone are set
- correctly. If possible, synchronize your clock with public <a
- href="http://en.wikipedia.org/wiki/Network_Time_Protocol">time
- servers</a>.
- </li>
- <li> <strong>Windows / OS X Configuration</strong>:
- <ol>
- <li>Right click on the Vidalia icon in your task bar. Choose <tt>Control Panel</tt>.</li>
- <li>Click <tt>Setup Relaying</tt>.</li>
- <li>Choose <tt>Relay Traffic for the Tor network</tt> if you want to be
- a public relay (recommended), or choose <tt>Help censored users reach the
- Tor network</tt> if you want to be a <a href="../faq.html.en#RelayOrBridge">bridge</a>
- for users in countries that censor their Internet.</li>
- <li>Enter a nickname for your relay, and enter contact information in
- case we need to contact you about problems.</li>
- <li>Leave <tt>Attempt to automatically configure port forwarding</tt> clicked.
- Push the <tt>Test</tt> button to see if it works. If it does work, great.
- If not, see number 3 below.</li>
- <li>Choose the <tt>Bandwidth Limits</tt> tab. Select how much bandwidth you want to provide for Tor users like yourself.</li>
- <li>Choose the <tt>Exit Policies</tt> tab. If you want to allow others
- to use your relay for these services, don't change anything. Un-check
- the services you don't want to allow people to <a href="../faq.html.en#ExitPolicies">reach from your relay</a>.
- If you want to be a non-exit relay, un-check all services.</li>
- <li>Click the <tt>Ok</tt> button. See Step Three below for confirmation
- that the relay is working correctly.</li>
- </ol>
- <br>
- <strong>Linux / Unix Configuration</strong>:
- <ul>
- <li>Edit the bottom part of <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#torrc">your
- torrc file</a>. If you want to be a public relay (recommended),
- make sure to define ORPort and <a href="../faq.html.en#ExitPolicies">look at ExitPolicy</a>; otherwise
- if you want to be a <a href="../faq.html.en#RelayOrBridge">bridge</a>
- for users in countries that censor their Internet,
- just use <a href="../bridges.html.en#RunningABridge">these lines</a>.
- </li>
- </ul></li>
- <li>If you are using a firewall, open a hole in your firewall
- so incoming connections can reach the ports you configured
- (ORPort, plus DirPort if you enabled it). If you have a
- hardware firewall (Linksys box, cablemodem, etc) you might like <a
- href="http://portforward.com/">portforward.com</a>. Also, make sure you
- allow all <em>outgoing</em> connections too, so your relay can reach the
- other Tor relays.
- </li>
- <li>Restart your relay. If it <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#Logs">logs
- any warnings</a>, address them.
- </li>
- <li>Subscribe to the <a
- href="http://archives.seul.org/or/announce/">or-announce</a>
- mailing list. It is very low volume, and it will keep you informed
- of new stable releases. You might also consider subscribing to <a
- href="../documentation.html.en#MailingLists">the higher-volume Tor lists</a>
- too.
- </li>
- </ol>
- <hr>
- <a id="check"></a>
- <h2><a class="anchor" href="#check">Step Three: Make sure it is working</a></h2>
- <br>
- <p>As soon as your relay manages to connect to the network, it will
- try to determine whether the ports you configured are reachable from
- the outside. This step is usually fast, but may take up to 20
- minutes. Look for a
- <a href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#Logs">log
- entry</a> like
- <tt>Self-testing indicates your ORPort is reachable from the outside. Excellent.</tt>
- If you don't see this message, it means that your relay is not reachable
- from the outside — you should re-check your firewalls, check that it's
- testing the IP and port you think it should be testing, etc.
- </p>
- <p>When it decides that it's reachable, it will upload a "server
- descriptor" to the directories, to let clients know
- what address, ports, keys, etc your relay is using. You can <a
- href="http://moria.seul.org:9032/tor/status/authority">load one of
- the network statuses manually</a> and
- look through it to find the nickname you configured, to make sure it's
- there. You may need to wait a few seconds to give enough time for it to
- make a fresh directory.</p>
- <hr>
- <a id="after"></a>
- <h2><a class="anchor" href="#after">Step Four: Once it is working</a></h2>
- <br>
- <p>
- We recommend the following steps as well:
- </p>
- <p>
- 6. Read
- <a href="https://wiki.torproject.org/noreply/TheOnionRouter/OperationalSecurity">about operational security</a>
- to get ideas how you can increase the security of your relay.
- </p>
- <p>
- 7. If you want to run more than one relay that's great, but please set <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#MultipleRelays">the
- MyFamily option</a> in all your relays' configuration files.
- </p>
- <p>
- 8. Decide about rate limiting. Cable modem, DSL, and other users
- who have asymmetric bandwidth (e.g. more down than up) should
- rate limit to their slower bandwidth, to avoid congestion. See the <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#LimitBandwidth">rate
- limiting FAQ entry</a> for details.
- </p>
- <p>
- 9. Back up your Tor relay's private key (stored in "keys/secret_id_key"
- in your DataDirectory). This is your relay's "identity," and
- you need to keep it safe so nobody can read the traffic that goes
- through your relay. This is the critical file to keep if you need to <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#UpgradeRelay">move
- or restore your Tor relay</a> if something goes wrong.
- </p>
- <p>
- 10. If you control the name servers for your domain, consider setting your
- reverse DNS hostname to 'anonymous-relay', 'proxy' or 'tor-proxy', so when
- other people see the address in their web logs, they will more quickly
- understand what's going on. Adding the <a
- href="https://tor-svn.freehaven.net/svn/tor/trunk/contrib/tor-exit-notice.html">Tor
- exit notice</a> on a vhost for this name can go a long way to deterring abuse
- complaints to you and your ISP if you are running an exit node.
- </p>
- <p>
- 11. If your computer isn't running a webserver, please consider
- changing your ORPort to 443 and your DirPort to 80. Many Tor
- users are stuck behind firewalls that only let them browse the
- web, and this change will let them reach your Tor relay. Win32
- relays can simply change their ORPort and DirPort directly
- in their torrc and restart Tor. OS X or Unix relays can't bind
- directly to these ports (since they don't run as root), so they will
- need to set up some sort of <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#ServerForFirewalledClients">
- port forwarding</a> so connections can reach their Tor relay. If you are
- using ports 80 and 443 already but still want to help out, other useful
- ports are 22, 110, and 143.
- </p>
- <p>
- 12. If your Tor relay provides other services on the same IP address
- — such as a public webserver — make sure that connections to the
- webserver are allowed from the local host too. You need to allow these
- connections because Tor clients will detect that your Tor relay is the <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#ExitEavesdroppers">safest
- way to reach that webserver</a>, and always build a circuit that ends
- at your relay. If you don't want to allow the connections, you must
- explicitly reject them in your exit policy.
- </p>
- <p>
- 13. (Unix only). Make a separate user to run the relay. If you
- installed the OS X package or the deb or the rpm, this is already
- done. Otherwise, you can do it by hand. (The Tor relay doesn't need to
- be run as root, so it's good practice to not run it as root. Running
- as a 'tor' user avoids issues with identd and other services that
- detect user name. If you're the paranoid sort, feel free to <a
- href="https://wiki.torproject.org/noreply/TheOnionRouter/TorInChroot">put Tor
- into a chroot jail</a>.)
- </p>
- <p>
- 14. (Unix only.) Your operating system probably limits the number
- of open file descriptors per process to 1024 (or even less). If you
- plan to be running a fast exit node, this is probably not enough. On
- Linux, you should add a line like "toruser hard nofile 8192" to your
- /etc/security/limits.conf file (where toruser is the user that runs the
- Tor process), and then restart Tor if it's installed as a package (or log
- out and log back in if you run it yourself).
- </p>
- <p>
- 15. If you installed Tor via some package or installer, it probably starts
- Tor for you automatically on boot. But if you installed from source,
- you may find the initscripts in contrib/tor.sh or contrib/torctl useful.
- </p>
- <p>
- When you change your Tor configuration, remember to verify that your
- relay still works correctly after the change. Be sure to set your
- "ContactInfo" line in the torrc so we can contact you if you need to
- upgrade or something goes wrong. If you have problems or questions, see
- the <a href="../documentation.html.en#Support">Support</a> section or
- <a href="../contact.html.en">contact us</a> on the tor-ops list. Thanks
- for helping to make the Tor network grow!
- </p>
- <hr>
- <p>If you have suggestions for improving this document, please <a
- href="../contact.html.en">send them to us</a>. Thanks!</p>
- </div><!-- #main -->
- </div>
- <hr>
- </div>
- <div class="bottom" id="bottom">
- <p>"Tor" and the "Onion Logo" are <a href="../trademark-faq.html.en">registered trademarks</a> of The Tor Project, Inc.
- <br>
- Content on this site is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/us/">Creative Commons Attribution 3.0 United States License</a>, unless otherwise noted.
- </p>
- <p>
- This page is also available in the following languages:
- <a href="tor-doc-relay.html.de">Deutsch</a>, <a href="tor-doc-relay.html.es">español</a>, <a href="tor-doc-relay.html.fr">français</a>, <a href="tor-doc-relay.html.it">Italiano</a>, <a href="tor-doc-relay.html.ko">한국어 (Hangul)</a>, <a href="tor-doc-relay.html.pl">polski</a>, <a href="tor-doc-relay.html.ru">Русский (Russkij)</a>, <a href="tor-doc-relay.html.zh-cn">中文(简) (Simplified Chinese)</a>.<br>
- How to set <a href="http://www.debian.org/intro/cn#howtoset">the default document language</a>.
- </p>
- <p>
- <i><a href="../contact.html.en" class="smalllink">Webmaster</a></i> -
- Last modified: Tue Jun 30 07:47:17 2009
- -
- Last compiled: Sun Oct 18 00:33:24 2009
- </p>
- </div>
- </body>
- </html>