torrc.sample.in 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. ## Configuration file for a typical Tor user
  2. ## Last updated 22 December 2017 for Tor 0.3.2.8-rc.
  3. ## (may or may not work for much older or much newer versions of Tor.)
  4. ##
  5. ## Lines that begin with "## " try to explain what's going on. Lines
  6. ## that begin with just "#" are disabled commands: you can enable them
  7. ## by removing the "#" symbol.
  8. ##
  9. ## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
  10. ## for more options you can use in this file.
  11. ##
  12. ## Tor will look for this file in various places based on your platform:
  13. ## https://www.torproject.org/docs/faq#torrc
  14. ## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't
  15. ## configure one below. Set "SOCKSPort 0" if you plan to run Tor only
  16. ## as a relay, and not make any local application connections yourself.
  17. #SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections.
  18. #SOCKSPort 192.168.0.1:9100 # Bind to this address:port too.
  19. ## Entry policies to allow/deny SOCKS requests based on IP address.
  20. ## First entry that matches wins. If no SOCKSPolicy is set, we accept
  21. ## all (and only) requests that reach a SOCKSPort. Untrusted users who
  22. ## can access your SOCKSPort may be able to learn about the connections
  23. ## you make.
  24. #SOCKSPolicy accept 192.168.0.0/16
  25. #SOCKSPolicy accept6 FC00::/7
  26. #SOCKSPolicy reject *
  27. ## Logs go to stdout at level "notice" unless redirected by something
  28. ## else, like one of the below lines. You can have as many Log lines as
  29. ## you want.
  30. ##
  31. ## We advise using "notice" in most cases, since anything more verbose
  32. ## may provide sensitive information to an attacker who obtains the logs.
  33. ##
  34. ## Send all messages of level 'notice' or higher to @LOCALSTATEDIR@/log/tor/notices.log
  35. #Log notice file @LOCALSTATEDIR@/log/tor/notices.log
  36. ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log
  37. #Log debug file @LOCALSTATEDIR@/log/tor/debug.log
  38. ## Use the system log instead of Tor's logfiles
  39. #Log notice syslog
  40. ## To send all messages to stderr:
  41. #Log debug stderr
  42. ## Uncomment this to start the process in the background... or use
  43. ## --runasdaemon 1 on the command line. This is ignored on Windows;
  44. ## see the FAQ entry if you want Tor to run as an NT service.
  45. #RunAsDaemon 1
  46. ## The directory for keeping all the keys/etc. By default, we store
  47. ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
  48. #DataDirectory @LOCALSTATEDIR@/lib/tor
  49. ## The port on which Tor will listen for local connections from Tor
  50. ## controller applications, as documented in control-spec.txt.
  51. #ControlPort 9051
  52. ## If you enable the controlport, be sure to enable one of these
  53. ## authentication methods, to prevent attackers from accessing it.
  54. #HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C
  55. #CookieAuthentication 1
  56. ############### This section is just for location-hidden services ###
  57. ## Once you have configured a hidden service, you can look at the
  58. ## contents of the file ".../hidden_service/hostname" for the address
  59. ## to tell people.
  60. ##
  61. ## HiddenServicePort x y:z says to redirect requests on port x to the
  62. ## address y:z.
  63. #HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/
  64. #HiddenServicePort 80 127.0.0.1:80
  65. #HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/
  66. #HiddenServicePort 80 127.0.0.1:80
  67. #HiddenServicePort 22 127.0.0.1:22
  68. ################ This section is just for relays #####################
  69. #
  70. ## See https://www.torproject.org/docs/tor-doc-relay for details.
  71. ## Required: what port to advertise for incoming Tor connections.
  72. #ORPort 9001
  73. ## If you want to listen on a port other than the one advertised in
  74. ## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
  75. ## follows. You'll need to do ipchains or other port forwarding
  76. ## yourself to make this work.
  77. #ORPort 443 NoListen
  78. #ORPort 127.0.0.1:9090 NoAdvertise
  79. ## The IP address or full DNS name for incoming connections to your
  80. ## relay. Leave commented out and Tor will guess.
  81. #Address noname.example.com
  82. ## If you have multiple network interfaces, you can specify one for
  83. ## outgoing traffic to use.
  84. ## OutboundBindAddressExit will be used for all exit traffic, while
  85. ## OutboundBindAddressOR will be used for all OR and Dir connections
  86. ## (DNS connections ignore OutboundBindAddress).
  87. ## If you do not wish to differentiate, use OutboundBindAddress to
  88. ## specify the same address for both in a single line.
  89. #OutboundBindAddressExit 10.0.0.4
  90. #OutboundBindAddressOR 10.0.0.5
  91. ## A handle for your relay, so people don't have to refer to it by key.
  92. ## Nicknames must be between 1 and 19 characters inclusive, and must
  93. ## contain only the characters [a-zA-Z0-9].
  94. ## If not set, "Unnamed" will be used.
  95. #Nickname ididnteditheconfig
  96. ## Define these to limit how much relayed traffic you will allow. Your
  97. ## own traffic is still unthrottled. Note that RelayBandwidthRate must
  98. ## be at least 75 kilobytes per second.
  99. ## Note that units for these config options are bytes (per second), not
  100. ## bits (per second), and that prefixes are binary prefixes, i.e. 2^10,
  101. ## 2^20, etc.
  102. #RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
  103. #RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
  104. ## Use these to restrict the maximum traffic per day, week, or month.
  105. ## Note that this threshold applies separately to sent and received bytes,
  106. ## not to their sum: setting "40 GB" may allow up to 80 GB total before
  107. ## hibernating.
  108. ##
  109. ## Set a maximum of 40 gigabytes each way per period.
  110. #AccountingMax 40 GBytes
  111. ## Each period starts daily at midnight (AccountingMax is per day)
  112. #AccountingStart day 00:00
  113. ## Each period starts on the 3rd of the month at 15:00 (AccountingMax
  114. ## is per month)
  115. #AccountingStart month 3 15:00
  116. ## Administrative contact information for this relay or bridge. This line
  117. ## can be used to contact you if your relay or bridge is misconfigured or
  118. ## something else goes wrong. Note that we archive and publish all
  119. ## descriptors containing these lines and that Google indexes them, so
  120. ## spammers might also collect them. You may want to obscure the fact that
  121. ## it's an email address and/or generate a new address for this purpose.
  122. ##
  123. ## If you are running multiple relays, you MUST set this option.
  124. ##
  125. #ContactInfo Random Person <nobody AT example dot com>
  126. ## You might also include your PGP or GPG fingerprint if you have one:
  127. #ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com>
  128. ## Uncomment this to mirror directory information for others. Please do
  129. ## if you have enough bandwidth.
  130. #DirPort 9030 # what port to advertise for directory connections
  131. ## If you want to listen on a port other than the one advertised in
  132. ## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as
  133. ## follows. below too. You'll need to do ipchains or other port
  134. ## forwarding yourself to make this work.
  135. #DirPort 80 NoListen
  136. #DirPort 127.0.0.1:9091 NoAdvertise
  137. ## Uncomment to return an arbitrary blob of html on your DirPort. Now you
  138. ## can explain what Tor is if anybody wonders why your IP address is
  139. ## contacting them. See contrib/tor-exit-notice.html in Tor's source
  140. ## distribution for a sample.
  141. #DirPortFrontPage @CONFDIR@/tor-exit-notice.html
  142. ## Uncomment this if you run more than one Tor relay, and add the identity
  143. ## key fingerprint of each Tor relay you control, even if they're on
  144. ## different networks. You declare it here so Tor clients can avoid
  145. ## using more than one of your relays in a single circuit. See
  146. ## https://www.torproject.org/docs/faq#MultipleRelays
  147. ## However, you should never include a bridge's fingerprint here, as it would
  148. ## break its concealability and potentially reveal its IP/TCP address.
  149. ##
  150. ## If you are running multiple relays, you MUST set this option.
  151. ##
  152. ## Note: do not use MyFamily on bridge relays.
  153. #MyFamily $keyid,$keyid,...
  154. ## Uncomment this if you do *not* want your relay to allow any exit traffic.
  155. ## (Relays allow exit traffic by default.)
  156. #ExitRelay 0
  157. ## Uncomment this if you want your relay to allow IPv6 exit traffic.
  158. ## (Relays only allow IPv4 exit traffic by default.)
  159. #IPv6Exit 1
  160. ## A comma-separated list of exit policies. They're considered first
  161. ## to last, and the first match wins.
  162. ##
  163. ## If you want to allow the same ports on IPv4 and IPv6, write your rules
  164. ## using accept/reject *. If you want to allow different ports on IPv4 and
  165. ## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules
  166. ## using accept/reject *4.
  167. ##
  168. ## If you want to _replace_ the default exit policy, end this with either a
  169. ## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to)
  170. ## the default exit policy. Leave commented to just use the default, which is
  171. ## described in the man page or at
  172. ## https://www.torproject.org/documentation.html
  173. ##
  174. ## Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses
  175. ## for issues you might encounter if you use the default exit policy.
  176. ##
  177. ## If certain IPs and ports are blocked externally, e.g. by your firewall,
  178. ## you should update your exit policy to reflect this -- otherwise Tor
  179. ## users will be told that those destinations are down.
  180. ##
  181. ## For security, by default Tor rejects connections to private (local)
  182. ## networks, including to the configured primary public IPv4 and IPv6 addresses,
  183. ## and any public IPv4 and IPv6 addresses on any interface on the relay.
  184. ## See the man page entry for ExitPolicyRejectPrivate if you want to allow
  185. ## "exit enclaving".
  186. ##
  187. #ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more
  188. #ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy
  189. #ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy
  190. #ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy
  191. #ExitPolicy reject *:* # no exits allowed
  192. ## Bridge relays (or "bridges") are Tor relays that aren't listed in the
  193. ## main directory. Since there is no complete public list of them, even an
  194. ## ISP that filters connections to all the known Tor relays probably
  195. ## won't be able to block all the bridges. Also, websites won't treat you
  196. ## differently because they won't know you're running Tor. If you can
  197. ## be a real relay, please do; but if not, be a bridge!
  198. ##
  199. ## Warning: when running your Tor as a bridge, make sure than MyFamily is
  200. ## NOT configured.
  201. #BridgeRelay 1
  202. ## By default, Tor will advertise your bridge to users through various
  203. ## mechanisms like https://bridges.torproject.org/. If you want to run
  204. ## a private bridge, for example because you'll give out your bridge
  205. ## address manually to your friends, uncomment this line:
  206. #PublishServerDescriptor 0
  207. ## Configuration options can be imported from files or folders using the %include
  208. ## option with the value being a path. If the path is a file, the options from the
  209. ## file will be parsed as if they were written where the %include option is. If
  210. ## the path is a folder, all files on that folder will be parsed following lexical
  211. ## order. Files starting with a dot are ignored. Files on subfolders are ignored.
  212. ## The %include option can be used recursively.
  213. #%include /etc/torrc.d/
  214. #%include /etc/torrc.custom