<p>When your node has an inbound connection <strong>via the Tor network</strong>, the <code>addr</code> field of the <code>getpeerinfo</code> 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 <code>addrlocal</code> field is your onion address (and port).</p>

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

<p>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.</p>

CC BY-SA 3.0
2017-04-07T11:34:22.413Z
2017-04-07T11:42:40.297Z
2017-04-07T11:42:40.297Z
Sven Williamson
<p>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 </p>

<pre><code>"addr": "127.0.0.1:46310",
"addrlocal": "****.onion:8333",
</code></pre>

<p>where the addrlocal addres is mine listening address.</p>

<p>Why are there inbound connections to myself?</p>

<bitcoind><tor>
Tor: inbound self-connection
V-X
# Tor: inbound self-connection

(Asked by: username_0 on 2017-04-07)

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?

**Tags:** bitcoind, tor


---

## 1 answers

### Answer by username_1 on 2017-04-07. Score: 1 | Accepted answer

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.


---

