Johnny2

Trouble-Shooting Retroshare Tor Hidden Node network connectivity issues

Sep 24th, 2021 (edited)
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.95 KB | None | 0 0
  1. Trouble-Shooting Retroshare Tor Hidden Node network connectivity issues
  2.  
  3. In nearly all cases of Tor related issues and problems with a Retroshare user setting up and running a Retroshare Tor Hidden node, the culprit found is not Retroshare. Its often the result of the user running multiple concurrent applications over the tor network with one or more of them conflicting in the data receiving and outgoing process. Another issue that crops up now and then is a misbehaving install altering the users tor configuration torrc file.
  4.  
  5. 1) The easiest method in the past has been to open a terminal window and run the same tor binary they are using to provide the RetroShare Tor Hidden Node service networking. $ ./tor and reading the output in real-time or setting the logging flags to a text file for them to submit to tor users to glance at and determine what their issue is.
  6.  
  7. If there is no tor log file command in the tor torrc file, you can add this to the torrc file using your text editor in the upper section of torrc commands. Check to see if your torrc file is in the hidden primary .retroshare folder in folder named tor.
  8.  
  9. With your text editor open the torrc file. On my linux system this is located in the hidden folder .retroshare/tor/torrc
  10. which normally contains a single torrc command line
  11.  
  12. ControlPort auto
  13.  
  14. To add the log file command the Retroshare Tor Hidden node must be Shut-Down in order for your addition to the Retroshare torrc file to be saved. With your text editor (Pluma, Notepad etc.) add the single additional log command to your torrc file resulting in the following
  15.  
  16. ControlPort auto
  17. Log notice file retroshare-torlog.txt
  18.  
  19. Save and then run your Retroshare Tor Hidden Node and after 1-2 minutes when the circuit network has created the new network OR has completely failed to do so then quit or kill the RetroShare instance using the quit or system monitor kill option and review the retroshare-torlog.txt file using your text editor (Pluma, Notepad etc.) if conflicts or error messages are not enough for you to work out your tor connectivity alone then provide your short log to more experienced tor users to help you discern what your connection issues are. The newly created retroshare-torlog.txt file should be found in your users home folder.
  20.  
  21. Often the log file quickly shows what the problem and issues are preventing a Tor Network to be 100% generated.
  22.  
  23. Note, when logging of your tor connection is no longer needed, using your text editor application delete the torrc log notice command out. Otherwise your notices.log file would continuously get larger and larger.
  24.  
  25. ControlPort auto
  26. Log notice file retroshare-torlog.txt <-- delete this single added torrc command line when you do not need active logging
  27.  
  28. torrc command syntax and examples references
  29. https://github.com/torproject/tor/blob/main/src/config/torrc.sample.in
  30. https://helpmanual.io/man5/torrc/
  31.  
  32. Remember in the new tor binary's, all old v2 short .onion urls are no longer being used nor connected to, only the new v3 long .onion links of users and websites are routed, connected to and sharing data now.
  33.  
  34. Tor Binary and Source to compile download reference https://www.torproject.org/download/tor/
  35.  
  36. Example old no longer used v2 tor short .onion link e34ylf2agbxzrw42.onion
  37. Example new currently used v3 tor long secure onion link tastors5pmf7odh3mj5exziunehbbx6v4mlhdthod7dejzjcwvkh5rid.onion
  38.  
  39. 2) Another troubleshooting method which is very valid for users running multiple tor networked applications concurrently is to isolate their Retroshare Tor circuit connectivity solely to the Retroshare application. Turn-off each and every tor networked application on the system. If available, use a system monitor to kill all instances of the tor binarys running in the background also. Start the Retroshare Tor Hidden Node to see if Retroshare connects with your friends and the Preference -- Network settings indicate the Tor incoming, outgoing connectivity is Okay, Green.
  40.  
  41. 3) Some nations are making it very difficult to sustain a Tor Network Circuit normally. China, Russia, Australia come to mind. There's likely others also that interfere with tor users, tor servers and the tor network in the Middle East and elsewhere. Setting up a stand-alone custom torrc for obfuscation abilities and its tor plugins for fooling the Great firewall state sponsored clamping down on Tor users is touched on in another pastebin where I explored, tested and set that up for a Chinese student deep behind the Chinese Firewall. However using Relays and Tor Obfuscation Plugins obtained from the Tor Browser is possible for an advanced tor user and in a manual Retroshare Tor Hidden node setup, they can include relays and or obfuscation plugins commands in a normal tor torrc file to use.
  42.  
  43. Tip: If you can directly connect to tor using the Tor Browser to the tor network, its likely your nation and ISP provider is not blocking all tor network ability. If on the other hand you need to use a plugin obfuscation mode to connect to the tor network or a relay bridge then its entirely likely that your Nation or ISP provider is hampering or blocking the use of the tor network but it is still possible to manually setup a Retroshare Tor hidden node in advanced mode and add the binary plugins (borrowing them from the tor browser to your system files) then call them into use in the tor torrc file.
  44. .
  45. Reference Linux Ubuntu tor v3 hidden node torrc file example
  46. https://pastebin.com/7tSrkDwJ
  47. .
  48. FAQ: Do you need in series of troubleshooting exercises to Forward your Tor Ports? The Tor Network often doesn't need to have its ports forwarded to function. Obviously if the Tor Browser is operating correctly you know Port 9150 and likely 9160 are open use.
  49.  
  50. Do you need to expressly generate and use a Tor V3 .onion url? Yes, the previous two Tor binary stables refuse to connect to the older short .onion url and flat-out ignores them. Many experienced tor users and operators running the tor binarys in terminal windows have seen those expressions and immediately switched all of their websites, coding and gear over to fully embrace the more secure Tor v3 upgrade.
  51.  
  52. Do you just increment the tor ports to use by 1 such as 9050, 9051 ? No, they should be at least 2 and I would urge at least 10 from one tor port in use to the next. Port 9050, 9060, 9150, 9160, 9170 etc. Retroshare's automatic tor configuration coding determines unused, available ports to use, its useful to write those down in the context they are used.
  53.  
  54. Sep 24 21:32:02.992 [notice] Tor 0.4.6.7 running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1f, Zlib 1.2.11, Liblzma 5.2.4, Libzstd N/A and Glibc 2.31 as libc.
  55.  
  56. I believe the stable releases of Tor v3 0.4.6.6 and now Tor v3 0.4.6.7 onward will totally ignore all v2 Onion urls and v2 hidden service websites.
  57.  
  58. Example Upgrade your tor router to v0.4.6.6
  59. https://pastebin.com/GZ6CxM9Q
  60. .
  61. Download Tor
  62. Torproject Downloads
  63. https://www.torproject.org/download/tor/
  64. .
  65. linux build tor-0.4.6.7 configure, compile, installed into your system files from its source.
  66. $ ./configure
  67. $ make
  68. $ sudo make install
  69. .
  70. Unstable Alpha 0.4.7.1-alpha released Sept 17th. 2021
  71. Why there is so much interest in this latest alpha unstable release of Tor?
  72. At long last the developers have added teeth to protecting the tor network layer-2 guard relays from discovery attacks.
  73. .
  74. Changes in version 0.4.7.1-alpha - 2021-09-17
  75. This version is the first alpha release of the 0.4.7.x series. One
  76. major feature is Vanguards Lite, from proposal 333, to help mitigate
  77. guard discovery attacks against onion services. It also includes
  78. numerous bug fixes.
  79.  
  80. o Major features (Proposal 332, onion services, guard selection algorithm):
  81. - Clients and onion services now choose four long-lived "layer 2"
  82. guard relays for use as the middle hop in all onion circuits.
  83. These relays are kept in place for a randomized duration averaging
  84. 1 week. This mitigates guard discovery attacks against clients and
  85. short-lived onion services such as OnionShare. Long-lived onion
  86. services that need high security should still use the Vanguards
  87. addon (https://github.com/mikeperry-tor/vanguards). Closes ticket
  88. 40363; implements proposal 333.
  89.  
  90. o Minor features (bridge testing support):
  91. - Let external bridge reachability testing tools discard cached
  92. bridge descriptors when setting new bridges, so they can be sure
  93. to get a clean reachability test. Implements ticket 40209.
  94.  
  95. o Minor features (fuzzing):
  96. - When building with --enable-libfuzzer, use a set of compiler flags
  97. that works with more recent versions of the library. Previously we
  98. were using a set of flags from 2017. Closes ticket 40407.
  99.  
  100. o Minor features (testing configuration):
  101. - When TestingTorNetwork is enabled, skip the permissions check on
  102. hidden service directories. Closes ticket 40338.
  103. - On a testing network, relays can now use the
  104. TestingMinTimeToReportBandwidth option to change the smallest
  105. amount of time over which they're willing to report their observed
  106. maximum bandwidth. Previously, this was fixed at 1 day. For
  107. safety, values under 2 hours are only supported on testing
  108. networks. Part of a fix for ticket 40337.
  109. - Relays on testing networks no longer rate-limit how frequently
  110. they are willing to report new bandwidth measurements. Part of a
  111. fix for ticket 40337.
  112. - Relays on testing networks now report their observed bandwidths
  113. immediately from startup. Previously, they waited until they had
  114. been running for a full day. Closes ticket 40337.
  115.  
  116. o Minor bugfixes (circuit padding):
  117. - Don't send STOP circuit padding cells when the other side has
  118. already shut down the corresponding padding machine. Fixes bug
  119. 40435; bugfix on 0.4.0.1-alpha.
  120.  
  121. o Minor bugfixes (compatibility):
  122. - Fix compatibility with the most recent Libevent versions, which no
  123. longer have an evdns_set_random_bytes() function. Because this
  124. function has been a no-op since Libevent 2.0.4-alpha, it is safe
  125. for us to just stop calling it. Fixes bug 40371; bugfix
  126. on 0.2.1.7-alpha.
  127.  
  128. o Minor bugfixes (control, sandbox):
  129. - Allows the control command SAVECONF to succeed when the seccomp
  130. sandbox is enabled. Makes SAVECONF keep only one backup file, to
  131. simplify implementation. Fixes bug 40317; bugfix on 0.2.5.4-alpha.
  132. Patch by Daniel Pinto.
  133.  
  134. o Minor bugfixes (heartbeat):
  135. - Adjust the heartbeat log message about distinct clients to
  136. consider the HeartbeatPeriod rather than a flat 6-hour delay.
  137. Fixes bug 40330; bugfix on 0.2.6.3-alpha.
  138.  
  139. o Minor bugfixes (logging, relay):
  140. - Add spaces between the "and" when logging the "Your server has not
  141. managed to confirm reachability for its" on dual-stack relays.
  142. Fixes bug 40453; bugfix on 0.4.5.1-alpha. Patch by Neel Chauhan.
  143.  
  144. o Minor bugfixes (onion service):
  145. - Do not flag an HSDir as non-running in case the descriptor upload
  146. or fetch fails. An onion service closes pending directory
  147. connections before uploading a new descriptor which leads to
  148. wrongly flagging many relays and thus affecting circuit path
  149. selection. Fixes bug 40434; bugfix on 0.2.0.13-alpha.
  150.  
  151. o Minor bugfixes (statistics):
  152. - Fix a fencepost issue when we check stability_last_downrated where
  153. we called rep_hist_downrate_old_runs() twice. Fixes bug 40394;
  154. bugfix on 0.2.0.5-alpha. Patch by Neel Chauhan.
  155.  
  156. o Minor bugfixes (tests):
  157. - Fix a bug that prevented some tests from running with the correct
  158. names. Fixes bug 40365; bugfix on 0.4.3.1-alpha.
  159.  
  160. o Documentation:
  161. - Add links to original tor design paper and anonbib to
  162. docs/HACKING/README.1st.md. Closes ticket 33742. Patch from
  163. Emily Bones.
  164. - Describe the "fingerprint-ed25519" file in the tor.1 man page.
  165. Fixes bug 40467; bugfix on 0.4.3.1-alpha. Patch by Neel Chauhan.
  166.  
  167. ================================================================================
  168.  
  169. Sample retroshare-torlog.txt output file on a successful Retroshare Tor Hidden Node tor circuit start-up
  170.  
  171. Sep 26 14:54:09.000 [notice] Tor 0.4.7.1-alpha opening new log file.
  172. Sep 26 14:54:09.442 [notice] We compiled with OpenSSL 1010106f: OpenSSL 1.1.1f 31 Mar 2020 and we are running with OpenSSL 1010106f: 1.1.1f. These two versions should be binary compatible.
  173. Sep 26 14:54:09.443 [notice] Tor 0.4.7.1-alpha running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1f, Zlib 1.2.11, Liblzma 5.2.4, Libzstd N/A and Glibc 2.31 as libc.
  174. Sep 26 14:54:09.443 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
  175. Sep 26 14:54:09.443 [notice] This version is not a stable Tor release. Expect more bugs than usual.
  176. Sep 26 14:54:09.443 [notice] Read configuration file "/home/name/.retroshare/tor/default_torrc".
  177. Sep 26 14:54:09.443 [notice] Read configuration file "/home/name/.retroshare/tor//torrc".
  178. Sep 26 14:54:09.445 [notice] Opening Socks listener on 127.0.0.1:0
  179. Sep 26 14:54:09.445 [notice] Socks listener listening on port 40249.
  180. Sep 26 14:54:09.445 [notice] Opened Socks listener connection (ready) on 127.0.0.1:40249
  181. Sep 26 14:54:09.445 [notice] Opening Control listener on 127.0.0.1:0
  182. Sep 26 14:54:09.445 [notice] Control listener listening on port 39565.
  183. Sep 26 14:54:09.445 [notice] Opened Control listener connection (ready) on 127.0.0.1:39565
  184. Sep 26 14:54:09.000 [notice] Parsing GEOIP IPv4 file /usr/local/share/tor/geoip.
  185. Sep 26 14:54:09.000 [notice] Parsing GEOIP IPv6 file /usr/local/share/tor/geoip6.
  186. Sep 26 14:54:09.000 [notice] Bootstrapped 0% (starting): Starting
  187. Sep 26 14:54:09.000 [notice] Starting with guard context "default"
  188. Sep 26 14:54:10.000 [notice] New control connection opened from 127.0.0.1.
  189. Sep 26 14:54:10.000 [notice] Bootstrapped 5% (conn): Connecting to a relay
  190. Sep 26 14:54:11.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay
  191. Sep 26 14:54:11.000 [notice] Tor 0.4.7.1-alpha opening log file.
  192. Sep 26 14:54:11.000 [notice] Bootstrapped 14% (handshake): Handshaking with a relay
  193. Sep 26 14:54:12.000 [notice] Bootstrapped 15% (handshake_done): Handshake with a relay done
  194. Sep 26 14:54:12.000 [notice] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits
  195. Sep 26 14:54:12.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
  196. Sep 26 14:54:12.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
  197. Sep 26 14:54:13.000 [notice] Bootstrapped 100% (done): Done
  198. Sep 26 14:54:50.000 [notice] Owning controller connection has closed -- exiting now.
  199. Sep 26 14:54:50.000 [notice] Catching signal TERM, exiting cleanly.
  200.  
  201. Exited, quit the Retroshare Tor Hidden Node which also shut down this tor binary usage.
  202. Note, I'm running the newest alpha-test tor binary router for this test. Tor 0.4.7.1-alpha
  203. Note the Retroshare coding is using the user systems file installed Tor binary and geoip, geoip6 files.
  204.  
Add Comment
Please, Sign In to add comment