2

I set up my bitcoind to run on tor network. When I list peers, I get 8 outbound connections and 4 inbound, which all have

"addr": "127.0.0.1:46310",
"addrlocal": "****.onion:8333",

where the addrlocal addres is mine listening address.

Why are there inbound connections to myself?

1 Answer 1

1

When your node has an inbound connection via the Tor network, the addr field of the getpeerinfo command shows the local port to which your local socket for the connection is bound. It does not show you any information about the host which requested the connection, nor does it show you information about any Tor relay to which your node happens to be connected. As you rightly point out, the addrlocal field is your onion address (and port).

When the same node has an inbound connection via the ipv4 network (which is possible even for a Tor node provided it is properly configured) then the addr field does show you the ip address (and port) of the requesting host, and there is no addrlocal field.

So what appears to be "inbound connections to yourself" are simply inbound connections (from external hosts, not yourself) via the Tor network as opposed to the ipv4 network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.