Need help setting up Bitcoin Core full node over Tor (solely) and Tor hidden service. Tried a bunch

0
15


Fetching getnetworkinfo should result in IPv4 and IPv6 flags set to false and Tor to true. This will ensure that I am operating my node privately. But this is not the case for me.

This is what I should get , but am not getting ( see below for more):

"name": "ipv4",
"limited": true,
"reachable": false,

  "name": "ipv6",
"limited": true,
"reachable": false,

I am trying to run a full node with Bitcoin Core over Tor (solely) in Ubuntu (no bitcoin-qt) but the steps I am following are from many sources and I feel like I have been missing steps in between, not to mention that my technical skills are fairly basic.

Here’s where I’m at (Ubuntu 20.04 LTS ; bitcoind ; no bitcoin-qt).

I use a static IP address from my ISP . Behind CGNAT?

I use an external SATA drive mounted at /mnt/bitcoin to store Bitcoin full node data.

……….
desktop:~$ bitcoin-cli getnetworkinfo
— > Output extracts:

    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },
    {
      "name": "ipv6",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },
    {
      "name": "onion",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },

……….This is what is in my ~/.bitcoin/bitcoin.conf

assumevalid=0


zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333


debug=tor
onion=127.0.0.1:9050
listenonion=1
onlynet=onion
proxy=127.0.0.1:9050
bind=127.0.0.1
proxyrandomize=1


alertnotify=echo %s | mail -s "Bitcoin Alert" [email protected]

server=1
daemon=1
listen=1
rpcport=8332
rpcauth=.................XXXXXXXXXXX
datadir=/mnt/bitcoin
txindex=1
maxconnections=15
maxmempool=50
maxreceivebuffer=2500
maxsendbuffer=500
minrelaytxfee=0.0001

discover=0
torcontrol=127.0.0.1:9051

dbcache=100
maxorphantx=10
maxuploadtarget=5000

……….Running ubuntu and this is my “/etc/tor/torrc”

SOCKSPort 9050
Log notice stdout
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
HiddenServiceDir /var/lib/tor/lnd/
HiddenServicePort 8080 127.0.0.1:8080

……….This is my “/usr/share/tor/tor-service-defaults-torrc”

DataDirectory /var/lib/tor
PidFile /run/tor/tor.pid
RunAsDaemon 1
User debian-tor

ControlSocket /run/tor/control GroupWritable RelaxDirModeCheck
ControlSocketsGroupWritable 1
SocksPort unix:/run/tor/socks WorldWritable
SocksPort 9050

CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /run/tor/control.authcookie

Log notice syslog

……….These seem to look good to me.

desktop:~$ cat /mnt/bitcoin/debug.log
— > Output extracts:

2021-12-02T15:01:11Z Bitcoin Core version v22.0.0 (release build)

2021-12-02T15:01:11Z InitParameterInteraction: parameter interaction: -proxy set -> setting -upnp=0
2021-12-02T15:01:11Z InitParameterInteraction: parameter interaction: -proxy set -> setting -natpmp=0
2021-12-02T15:01:11Z InitParameterInteraction: parameter interaction: -proxy set -> setting -discover=0


2021-12-02T15:03:41Z loadblk thread start
2021-12-02T15:03:41Z torcontrol thread start
2021-12-02T15:03:41Z Bound to 127.0.0.1:8333
2021-12-02T15:03:41Z Bound to 127.0.0.1:8334
2021-12-02T15:03:41Z init message: Loading P2P addresses…
2021-12-02T15:03:41Z Leaving InitialBlockDownload (latching to false)
2021-12-02T15:03:41Z tor: Got service ID XXXXXXXXXXX, advertising service XXXXXXXXXXX.onion:8333
2021-12-02T15:03:41Z AddLocal(XXXXXXXXXXX.onion:8333,4)

……….
……….When I ran this , I get this. May be because my debug.log is at /mnt/bitcoin/debug.log (see above):
desktop:~$ tail -f ~/.bitcoin/debug.log

2021-11-14T21:35:25Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2021-11-14T21:35:25Z Script verification uses 3 additional threads
2021-11-14T21:35:25Z scheduler thread start
2021-11-14T21:35:25Z Binding RPC on address ::1 port 8332 failed.
2021-11-14T21:35:25Z Binding RPC on address 127.0.0.1 port 8332 failed.
2021-11-14T21:35:25Z Unable to bind any endpoint for RPC server
2021-11-14T21:35:25Z Error: Unable to start HTTP server. See debug log for details.
2021-11-14T21:35:25Z Shutdown: In progress...
2021-11-14T21:35:25Z scheduler thread exit
2021-11-14T21:35:25Z Shutdown: done

……….The node seems fully synced

desktop:~$ bitcoin-cli getblockchaininfo

{
  "chain": "main",
  "blocks": 712330,
  "headers": 712330,
  "bestblockhash": "XXXXXXXXXXX",
  "difficulty": 22335659268936.39,
  "mediantime": 1638500142,
  "verificationprogress": 0.9999986191151918,
  "initialblockdownload": false,

Thank you very much.

……….References consulted include , but not limited to:

https://www.youtube.com/watch?v=n2IUYL7hCOI
https://jlopp.github.io/bitcoin-core-config-generator/
https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service
https://stopanddecrypt.medium.com/running-bitcoin-lightning-nodes-over-the-tor-network-2021-edition-489180297d5



Source link

Leave a reply