Bitcoin Forum
April 24, 2024, 09:43:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Incoming connections over Tor  (Read 274 times)
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
April 17, 2021, 08:18:27 AM
Merited by LoyceV (4), Rath_ (4), o_e_l_e_o (2), ABCbits (1)
 #1

I want to accept incoming connections to my node while running everything over Tor to shield my IP. I'm running Core on a Pi, ufw is inactive and I have no open ports on my router (I read this is not necessary to accept incoming connections over Tor?). My node has been running and fully synced for days but still only has the standard 10 outgoing connections and 0 incoming

In the debug.log file I can find the following lines (xxxxxxxx being a v3 onion address):

tor: Got service ID xxxxxxxx, advertising service xxxxxxxx.onion:8333
AddLocal(xxxxxxxxx.onion:8333,4)

My bitcoin.conf file has the following lines:

disablewallet=1
proxy=127.0.0.1:9050
bind=127.0.0.1
listen=1

and my torrc has the following lines:

ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1

Anybody have an idea?
Thanks
1713951810
Hero Member
*
Offline Offline

Posts: 1713951810

View Profile Personal Message (Offline)

Ignore
1713951810
Reply with quote  #2

1713951810
Report to moderator
1713951810
Hero Member
*
Offline Offline

Posts: 1713951810

View Profile Personal Message (Offline)

Ignore
1713951810
Reply with quote  #2

1713951810
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713951810
Hero Member
*
Offline Offline

Posts: 1713951810

View Profile Personal Message (Offline)

Ignore
1713951810
Reply with quote  #2

1713951810
Report to moderator
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6677


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 17, 2021, 08:39:20 AM
 #2

ufw is inactive and I have no open ports on my router (I read this is not necessary to accept incoming connections over Tor?).

This is not correct. You cannot get any incoming peers if your peer gossiping port is blocked. You need to open port 8333 on your firewall and then you should get incoming peers.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4163


View Profile
April 17, 2021, 09:35:37 AM
Merited by Foxpup (1), ABCbits (1)
 #3

This is not correct. You cannot get any incoming peers if your peer gossiping port is blocked. You need to open port 8333 on your firewall and then you should get incoming peers.
It's Tor. It doesn't have anything to do with your local firewall and portforwarding should not be needed, you're binding your listening service to Tor. It would be necessary for clearnet, which is not what OP is trying to achieve here.

OP, try manually setting up the service and see if it works: https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md#3-manually-create-a-bitcoin-core-onion-service.


.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6677


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 17, 2021, 10:25:41 AM
 #4

This is not correct. You cannot get any incoming peers if your peer gossiping port is blocked. You need to open port 8333 on your firewall and then you should get incoming peers.
It's Tor. It doesn't have anything to do with your local firewall and portforwarding should not be needed, you're binding your listening service to Tor. It would be necessary for clearnet, which is not what OP is trying to achieve here.

But if all the ports are blocked in the firewall, won't this catch the port Tor is using too? Like 9050 (though I doubt that particular one because it's bound to localhost) or 9051 in OP's case.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4163


View Profile
April 17, 2021, 10:29:04 AM
 #5

But if all the ports are blocked in the firewall, won't this catch the port Tor is using too? Like 9050 (though I doubt that particular one because it's bound to localhost) or 9051 in OP's case.
It shouldn't. The port (9050) that Tor uses is a local port for Bitcoin Core to be binded to. It doesn't make sense to portforward it unless you're expecting any data to be transferred through the clearnet. Having both of those ports blocked should still be fine, that is actually my current configuration with none of those being portforwarded.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
April 17, 2021, 10:44:36 AM
 #6


I changed torrc and bitcoin.conf to the following with the externalip coming from /var/lib/tor/bitcoin-service/hostname

HiddenServiceDir /var/lib/tor/bitcoin-service/
HiddenServicePort 8333 127.0.0.1:8334

disablewallet=1
proxy=127.0.0.1:9050
bind=127.0.0.1
listen=1
externalip=xxxxxxxxxxxx.onion

I had 0 connections, after reboot I'm back to having 10 outgoing. I checked the log and and I see several lines like this (with x.x.x.x being some IP):

Socks5() connect to x.x.x.x:8333 failed: connection refused
Socks5() connect to x.x.x.x:8333 failed: general failure

Not sure if it's relevant.
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
April 17, 2021, 11:13:59 AM
 #7

Have you tried running Bitcoin Core on another device (VirtualBox also works) and configure it only connect to your current full node? While it's unlikely, it's possible that all node chose another node rather than yours. You can do it by adding -connect=<ip> when you run Bitcoin Core through terminal.

I have Virtual Box installed but looks like some updates broke it, I need to sign 3 kernel modules before using VB and this is currently beyond my skill level (running Linux)
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
April 17, 2021, 12:00:22 PM
 #8

Have you tried running Bitcoin Core on another device (VirtualBox also works) and configure it only connect to your current full node? While it's unlikely, it's possible that all node chose another node rather than yours. You can do it by adding -connect=<ip> when you run Bitcoin Core through terminal.

I have Virtual Box installed but looks like some updates broke it, I need to sign 3 kernel modules before using VB and this is currently beyond my skill level (running Linux)

That's problematic, i don't have such skill either. By any chance, do you use rolling-release linux distro? It tends to broke some application.
Usually i would just install older version which running properly or use older kernel version.

No Ubuntu 20.04, but I upgraded the kernel to 5.8.0-50-generic. A few days ago I updated and got a message about configuring Secure Boot, had to choose a password that I had to enter after rebooting, etc...
I'll ask some people if they can help me with this.
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
April 19, 2021, 09:36:31 AM
 #9

Is there anyone else here that runs Bitcoin Core as a hidden service? I really would like to contribute to the network by allowing incoming connections over Tor.
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
May 05, 2021, 08:25:25 AM
 #10

Is there anyone else here that runs Bitcoin Core as a hidden service? I really would like to contribute to the network by allowing incoming connections over Tor.

Bitcoin Core 0.21 introduced Torv3 addresses and made them default. BIP155 was needed so that other nodes could gossip Torv3 addresses across the network. Unfortunately, since it was introduced in the same release, old nodes won't propagate your address.

I have been experiencing the same problem since I have set up Tor on my node. A few days ago, I decided to manually connect to a bunch of nodes from this Reddit thread and I finally started getting incoming connections. Supposedly, I was not the only person to do that and my address propagated quickly across Torv3 compatible nodes. Use the following command to connect to some node.

bitcoin-cli addnode address onetry

You can replace "onetry" with "add" if you want to add those nodes to your local list. "onetry" worked fine for me. You can also connect to my node: 6gk54wewlpa54psxx2a2jprds7jkdjmwdjvy42qjaybcjbhjdvda66ad.onion

Fortunately, a lot of node operators might decide to update their nodes soon due to the taproot soft fork support which has been introduced in the recent 0.21.1 update.
Birb
Copper Member
Jr. Member
*
Offline Offline

Activity: 39
Merit: 10


View Profile WWW
May 11, 2021, 09:07:14 AM
 #11

Have you tried tails os?

BIRB.COM
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
June 14, 2021, 10:50:10 PM
 #12

Sorry for the late reply. I managed to fix it have incoming connections to my onion service now. Has been a while so I don't remember exactly what I did but it works now.
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
June 15, 2021, 04:32:37 PM
Merited by LoyceV (4), o_e_l_e_o (2), ABCbits (1)
 #13

Sorry for the late reply. I managed to fix it have incoming connections to my onion service now. Has been a while so I don't remember exactly what I did but it works now.

If you started getting those connections about 2 - 3 weeks ago then it's very likely due to node operators upgrading to the latest version of Bitcoin Core because of the taproot softfork. Since then, I have been getting more than 10+ incoming connections over Tor.
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
June 19, 2021, 03:01:56 PM
 #14

If you started getting those connections about 2 - 3 weeks ago then it's very likely due to node operators upgrading to the latest version of Bitcoin Core because of the taproot softfork. Since then, I have been getting more than 10+ incoming connections over Tor.

Thats ... exactly what happened.
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!