Bitcoin Forum
May 06, 2024, 08:46:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Verifying that Bitcoin is running over Tor  (Read 720 times)
51mqseq (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
November 13, 2016, 05:54:17 PM
 #1

I'm running Bitcoin Core version v0.13.0 (win 64-bit) and I'd like it to run over Tor (Tor Browser 6.0.5).

In Bitcoin Core's Options GUI I have "Connect through SOCKS5 proxy (default proxy)" DEselected, and I have "Use separate SOCKS5 proxy to reach peers via Tor hidden services [Proxy IP:127.0.0.1] [Port:9050]" SELECTED

In Tor Browser Options/Advanced/Network/Connection I have "Manual proxy configuration: [SOCKS Host: 127.0.0.1] [Port:9150]

I'd think this means that Tor is listening on port 9150, while Bitcoin is trying to connect through port 9050, which would mean no connection. Strange thing is, Bitcoin is connecting.

I'm tempted to just make the ports match, but I wouldn't be confident that it's actually running over Tor since I don't understand why it's working now.

Is there a way to verify that Bitcoin is running over Tor?
1715028408
Hero Member
*
Offline Offline

Posts: 1715028408

View Profile Personal Message (Offline)

Ignore
1715028408
Reply with quote  #2

1715028408
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715028408
Hero Member
*
Offline Offline

Posts: 1715028408

View Profile Personal Message (Offline)

Ignore
1715028408
Reply with quote  #2

1715028408
Report to moderator
1715028408
Hero Member
*
Offline Offline

Posts: 1715028408

View Profile Personal Message (Offline)

Ignore
1715028408
Reply with quote  #2

1715028408
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
November 13, 2016, 05:57:58 PM
 #2

If you go to Help > Debug Window > Console and type into the box at the bottom
Code:
getnetworkinfo
it will tell you whether your node is reachable over Tor. Just scroll down in the output and find the entry for "onion". Under that it will say "reachable". If it is reachable over tor (i.e. you are listening over Tor), it will say "true". If you are not, it will be false.

51mqseq (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
November 13, 2016, 06:28:37 PM
 #3

Ah, thanks very much achow101! I'd seen getnetworkinfo before, but when I searched for it it seemed like it was an android function.

Here's what I get after changing Bitcoin to connect over :9150:
Code:
 "networks": [
    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "ipv6",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "onion",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9150",
      "proxy_randomize_credentials": true
    }

I'm not sure how to interpret this. It seems Bitcoin is reachable over all three networks. Don't I want ipv4 and ipv6 to be
Code:
"reachable": false
in order to ensure it's going over Tor?

(in case others are interested there's a related thread here)
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
November 13, 2016, 06:38:27 PM
 #4

I'm not sure how to interpret this. It seems Bitcoin is reachable over all three networks.
Yes.

Don't I want ipv4 and ipv6 to be
Code:
"reachable": false
in order to ensure it's going over Tor?
No. When all three are true, it will be able to accept connections from ipv4, ipv6, and tor nodes. This means that it will still have connections over Tor. However, if you want it exclusively to operate over Tor, then you have to start it with this option:
Code:
-onlynet=onion

51mqseq (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
November 13, 2016, 06:59:31 PM
 #5

You da man/woman achow101:
Code:
"networks": [
    {
      "name": "ipv4",
      "limited": true,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "ipv6",
      "limited": true,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "onion",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9150",
      "proxy_randomize_credentials": true
    }

Thanks so much!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!