Author

Topic: How to connect to full node over Tor (Read 222 times)

newbie
Activity: 16
Merit: 10
August 20, 2023, 08:47:39 AM
#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 👋
HCP
legendary
Activity: 2086
Merit: 4363
March 16, 2021, 02:00:15 AM
#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.



newbie
Activity: 21
Merit: 1
March 15, 2021, 11:49:57 PM
#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...
newbie
Activity: 21
Merit: 1
March 15, 2021, 10:11:04 PM
#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.
HCP
legendary
Activity: 2086
Merit: 4363
March 15, 2021, 08:41:13 PM
#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:




newbie
Activity: 21
Merit: 1
March 15, 2021, 07:44:01 PM
#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
Activity: 2086
Merit: 4363
March 15, 2021, 03: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
newbie
Activity: 21
Merit: 1
March 15, 2021, 02: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
Activity: 2086
Merit: 4363
March 14, 2021, 11:41:23 PM
#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
newbie
Activity: 21
Merit: 1
March 13, 2021, 11:22:36 AM
#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
Activity: 2086
Merit: 4363
March 12, 2021, 09:50:18 PM
#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?
newbie
Activity: 21
Merit: 1
March 12, 2021, 12: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.
Jump to: