The result of bitcoin-cli getpeerinfo command

1

When I type bitcoin-cli getpeerinfo in shell, conspicuous property of the result are addr and addrlocal addrbind.

enter image description here

14.xx is my address and others are peer's address. I know that Bitcoin client can do port forwarding using UPnP query to my router. so, I checked my router whether the port number(48302, 44660) is opened or not but, no any port is currently open. This is very strange point. my peers should cannot communicate with me without port forwarding since I'm using router.

Can you give information technically?

Sorry for my English

Hyunsoo

Posted 2019-11-23T14:31:13.503

Reputation: 97

Answers

1

so, I checked my router whether the port number(48302, 44660) is opened or not but, no any port is currently open.

They don't appear open because those ports are not always open listening for incoming connections. Rather those ports are bound to temporarily by the forwarding software which then initiates the connection to your computer. As soon as the connection to the peer closes, so will that port.

What you see with that is like the ports that your browser uses to connect to remote web servers. When you have your browser open, a port is opened. But if you port scan your own computer, you won't see those ports. You can see what ports are active and connected to other servers by using the netstat -nap command.

Andrew Chow

Posted 2019-11-23T14:31:13.503

Reputation: 40 910

Thank for replying :) I'd like to search detail about your first paragraph. can you give some keyword?Hyunsoo 2019-11-23T18:30:08.927

@Hyunsoo Perhaps read up on how TCP works? Both outgoing and incoming connections use TCP ports, but for outgoing connections they're randomly selected non-open ports.Pieter Wuille 2019-11-23T18:50:58.087