Bitcoin Forum
May 03, 2024, 01:41:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to connect to full node over Tor  (Read 188 times)
Ambivilance (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 1


View Profile
March 12, 2021, 05:35:38 PM
 #1

I have a raspberry pi with bitcoin core + electrum personal server. I would SSH into it and then run electrum with these arguments: ./electrum --oneserver --server localhost:50002:S . I later created a tor hidden service and got an onion address. I tried this: ./electrum --oneserver --server myOnion:50001:t -p socks5:localhost9050 and it would not connect. I also tried this:  ./electrum --oneserver --server myOnion:50002:s --proxy socks5:127.0.0.1:9050 and it would not connect.

On bitnodes my onion is up, though it does not say Tor under the network description, like it does for others. I forwarded port 8333.

I have these in the bitcoin.conf:

proxy=127.0.0.1:9050

listen=1

bind=127.0.0.1

I am unsure what I am meant to do. I want to connect to it through electrum and I want the maximum privacy, so I don't other people to be able to query my node. Am I meant to just do what I did before (./electrum --oneserver --server localhost:50002:S) and it is over tor since I have walletbroadcast=0 on? Or am I meant to use a hidden service, in which case, what is the correct electrum argument? Also should I want my node to be up visible on bitnodes or not?

Thank you.
1714700480
Hero Member
*
Offline Offline

Posts: 1714700480

View Profile Personal Message (Offline)

Ignore
1714700480
Reply with quote  #2

1714700480
Report to moderator
1714700480
Hero Member
*
Offline Offline

Posts: 1714700480

View Profile Personal Message (Offline)

Ignore
1714700480
Reply with quote  #2

1714700480
Report to moderator
1714700480
Hero Member
*
Offline Offline

Posts: 1714700480

View Profile Personal Message (Offline)

Ignore
1714700480
Reply with quote  #2

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

Posts: 1714700480

View Profile Personal Message (Offline)

Ignore
1714700480
Reply with quote  #2

1714700480
Report to moderator
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
March 13, 2021, 02:50:18 AM
 #2

I don't understand why you are connecting directly to your Pi and then attempting to use TOR for a local connection? Huh That really makes no sense. Especially given you are using --oneserver and --server arguments. That means Electrum will never connect to anything outside of the local machine.

Just to clarify, you have Bitcoin Core, EPS and Electrum all running on the Pi... And then you SSH into the Pi and start Electrum... correct?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Ambivilance (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 1


View Profile
March 13, 2021, 04:22:36 PM
 #3

I don't understand why you are connecting directly to your Pi and then attempting to use TOR for a local connection? Huh That really makes no sense. Especially given you are using --oneserver and --server arguments. That means Electrum will never connect to anything outside of the local machine.

Just to clarify, you have Bitcoin Core, EPS and Electrum all running on the Pi... And then you SSH into the Pi and start Electrum... correct?

Electrum is not on the pi. It is on a different computer.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
March 15, 2021, 04:41:23 AM
 #4

Electrum is not on the pi. It is on a different computer.
Then I don't understand how this ever worked:
Code:
./electrum --oneserver --server localhost:50002:S

That would require EPS and Electrum to be on the same computer... which means that Bitcoin Core+EPS+Electrum were all on the same computer... otherwise Electrum would never be able to connect to: "localhost" Huh

Is your "ElectrumPC" and Pi on the same network? Huh

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Ambivilance (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 1


View Profile
March 15, 2021, 07:10:05 PM
 #5

Electrum is not on the pi. It is on a different computer.
Then I don't understand how this ever worked:
Code:
./electrum --oneserver --server localhost:50002:S

That would require EPS and Electrum to be on the same computer... which means that Bitcoin Core+EPS+Electrum were all on the same computer... otherwise Electrum would never be able to connect to: "localhost" Huh

Is your "ElectrumPC" and Pi on the same network? Huh

Yes they are on the same network. It worked because prior to this 
Code:
./electrum --oneserver --server localhost:50002:S
I would establish an SSH connection with the raspberry pi, making localhost work for the pc.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
March 15, 2021, 08:05:21 PM
 #6

Oh right... I was thinking you were using SSH and then executing the "./electrum" command on the Pi terminal... but you're creating an SSH tunnel to the Pi, then using that to connect your local Electrum to the EPS server on the Pi. got it! Wink

Ok, so to clarify... the --server command is telling Electrum which server to connect to... so that should be something like "my.onion:50001:t"... the -p command is telling Electrum what the "local" Tor proxy is that it needs to connect to, to be able to reach the Tor network.

So, do you actually have Tor setup on your Electrum PC? If so, how did you install it? Browser Bundle or a general Tor package install? Huh

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Ambivilance (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 1


View Profile
March 16, 2021, 12:44:01 AM
 #7

Oh right... I was thinking you were using SSH and then executing the "./electrum" command on the Pi terminal... but you're creating an SSH tunnel to the Pi, then using that to connect your local Electrum to the EPS server on the Pi. got it! Wink

Ok, so to clarify... the --server command is telling Electrum which server to connect to... so that should be something like "my.onion:50001:t"... the -p command is telling Electrum what the "local" Tor proxy is that it needs to connect to, to be able to reach the Tor network.

So, do you actually have Tor setup on your Electrum PC? If so, how did you install it? Browser Bundle or a general Tor package install? Huh

I have the tor browser bundle but I have not done anything else or edited the torrc file (I have on the pi, but not on the pc though).
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
March 16, 2021, 01:41:13 AM
Last edit: November 15, 2023, 12:03:51 AM by HCP
Merited by BitMaxz (1)
 #8

I have the tor browser bundle but I have not done anything else or edited the torrc file (I have on the pi, but not on the pc though).
If you're using the browser bundle... I think you need to have the browser open and running (and a Tor circuit established)... and then use port 9150 in Electrum.

Otherwise, you would need to install and configure the tor service on your Electrum PC to create a "permanent" Tor proxy that Electrum can connect to. If you're using Debian/Ubuntu maybe this will help: https://2019.www.torproject.org/docs/debian.html.en


Also, you might want to create a dummy wallet... and try connecting it to a "public" Electrum onion server first, just to make sure that your Electrum is connecting successfully via your local Tor Proxy first... Once, you have successfully got Electrum connecting/syncing via Tor, then try getting it to connect to your onion server.

For instance... I am starting Tor Browser, let it build the circuit etc... then starting Electrum with:
Code:
electrum --oneserver -s nuzcmy763qatxi7wx46mz3feeqqimyur3qhlvrnxl5auku4xd2ov6lad.onion:50002:s -p 127.0.0.1:9150

And (after a short delay after startup) I see the syncing symbols and then I get the "blue dot" to indicate that the Proxy connection is working:





█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Ambivilance (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 1


View Profile
March 16, 2021, 03:11:04 AM
 #9

I have the tor browser bundle but I have not done anything else or edited the torrc file (I have on the pi, but not on the pc though).
If you're using the browser bundle... I think you need to have the browser open and running (and a Tor circuit established)... and then use port 9150 in Electrum.

Otherwise, you would need to install and configure the tor service on your Electrum PC to create a "permanent" Tor proxy that Electrum can connect to. If you're using Debian/Ubuntu maybe this will help: https://2019.www.torproject.org/docs/debian.html.en


Also, you might want to create a dummy wallet... and try connecting it to a "public" Electrum onion server first, just to make sure that your Electrum is connecting successfully via your local Tor Proxy first... Once, you have successfully got Electrum connecting/syncing via Tor, then try getting it to connect to your onion server.

For instance... I am starting Tor Browser, let it build the circuit etc... then starting Electrum with:
Code:
electrum --oneserver -s nuzcmy763qatxi7wx46mz3feeqqimyur3qhlvrnxl5auku4xd2ov6lad.onion:50002:s -p 127.0.0.1:9150

And (after a short delay after startup) I see the syncing symbols and then I get the "blue dot" to indicate that the Proxy connection is working:
https://i.imgur.com/44zF30s.png

https://i.imgur.com/hSYodcJ.png
https://i.imgur.com/fIPp0eh.png

I established a tor circuit. I ran the command and it is stuck on not connected. In the terminal it is not saying "connect call failed" with a load of errors, which it did before, so that seems fine but still it won't connect so I am unsure what the problem is.
Ambivilance (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 1


View Profile
March 16, 2021, 04:49:57 AM
 #10

I have the tor browser bundle but I have not done anything else or edited the torrc file (I have on the pi, but not on the pc though).
If you're using the browser bundle... I think you need to have the browser open and running (and a Tor circuit established)... and then use port 9150 in Electrum.

Otherwise, you would need to install and configure the tor service on your Electrum PC to create a "permanent" Tor proxy that Electrum can connect to. If you're using Debian/Ubuntu maybe this will help: https://2019.www.torproject.org/docs/debian.html.en


Also, you might want to create a dummy wallet... and try connecting it to a "public" Electrum onion server first, just to make sure that your Electrum is connecting successfully via your local Tor Proxy first... Once, you have successfully got Electrum connecting/syncing via Tor, then try getting it to connect to your onion server.

For instance... I am starting Tor Browser, let it build the circuit etc... then starting Electrum with:
Code:
electrum --oneserver -s nuzcmy763qatxi7wx46mz3feeqqimyur3qhlvrnxl5auku4xd2ov6lad.onion:50002:s -p 127.0.0.1:9150

And (after a short delay after startup) I see the syncing symbols and then I get the "blue dot" to indicate that the Proxy connection is working:
https://i.imgur.com/44zF30s.png

https://i.imgur.com/hSYodcJ.png
https://i.imgur.com/fIPp0eh.png

I established a tor circuit. I ran the command and it is stuck on not connected. In the terminal it is not saying "connect call failed" with a load of errors, which it did before, so that seems fine but still it won't connect so I am unsure what the problem is.

Also when I do onlynet=onion  in the bitcoin.conf  , I get 0 peers. I added a load of onion seednodes and in the debug.log it is saying Connection refused (111) for each onion node so that is where the problem lies. I just do not know how to fix it...
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
March 16, 2021, 07:00:15 AM
Last edit: March 16, 2021, 07:54:39 AM by HCP
 #11

Bitcoin Core doesn't really need to be running over Tor for your Electrum to connect to EPS via Tor.

The issue you seem to have is Electrum connecting to your EPS via Tor, which seems like something isn't quite configured correctly with EPS and Tor... That's why I suggested trying one step at a time:
1. Get Electrum connecting and syncing to any Tor server to confirm your Electrum setup is OK
2. Get Electrum connecting and syncing to your Tor server
3. (optional) Get Bitcoin Core working on Tor

I've managed to setup electrs + tor hidden service within Ubuntu (running under Windows Subsystem for Linux aka WSL)... and then I have managed to get Electrum on the Windows machine to connect to that hidden service (using the Tor Browser bundle proxy)... so it is indeed possible.




█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
profedustream
Newbie
*
Offline Offline

Activity: 15
Merit: 9


View Profile
August 20, 2023, 01:47:39 PM
 #12

Hi guys,

I struggled a lot to connect Electrum <-> EPS <-> Bitcoin Core, especially 'cause of the .cookie path, the certificat problem, the configuration of config.ini and the 127.0.0.1 cookie file of Electrum.

There aren't lots of helps on Windows. That's why i've decided yesterday to do a full-explained tutorial on youtube, which explains everything: how to do, how to resolve all configuration problems, etc...
Link: https://www.youtube.com/watch?v=wxiH8hG9G-4&ab_channel=ProfEduStream
It's in french, but you can add subtitles on your own langage.

Hope it gonna help the community.

Bye 👋
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!