I have bitcoin-qt running on a Windows machine in my network started with the following command and empty config file (hence, all default configurations).
bitcoin-qt.exe -server=1 -rest=1
I can query the API endpoint of the node on the 8332
port; for instance:
curl http://localhost:8332/rest/chaininfo.json
I want to access the same REST API endpoint from the second computer on the network. On the second computer, I can reach the 8333
endpoint, but not 8332
.
$ nc -vz 196.168.1.2 8333
Connection to 192.168.1.2 port 8333 [tcp/*] succeeded!
$ nc -vz 196.168.1.2 8332
nc: connect to 192.168.1.2 port 8332 (tcp) failed: Connection refused
On the first computer (the one that is running bitcoin-qt), it seems port 8333
can be reached with the computer's IP in the LAN while port 8332
is only reachble via localhost
:
$ netstat -aon | findstr 8333
TCP 0.0.0.0:8333 0.0.0.0:0 LISTENING 117384
TCP 192.168.1.2:1033 84.212.130.217:8333 ESTABLISHED 117384
TCP 192.168.1.2:1034 50.39.164.136:8333 ESTABLISHED 117384
TCP 192.168.1.2:1035 45.132.158.199:8333 ESTABLISHED 117384
TCP 192.168.1.2:1045 95.84.137.91:8333 ESTABLISHED 117384
TCP 192.168.1.2:1065 82.197.215.125:8333 ESTABLISHED 117384
TCP 192.168.1.2:1076 209.237.133.54:8333 ESTABLISHED 117384
TCP 192.168.1.2:1091 178.48.160.142:8333 ESTABLISHED 117384
TCP 192.168.1.2:1093 95.110.133.223:8333 ESTABLISHED 117384
TCP 192.168.1.2:1106 5.188.62.18:8333 ESTABLISHED 117384
TCP 192.168.1.2:1112 108.248.87.92:8333 ESTABLISHED 117384
TCP [::]:8333 [::]:0 LISTENING 117384
$ netstat -aon | findstr 8332
TCP 127.0.0.1:8332 0.0.0.0:0 LISTENING 117384
TCP [::1]:8332 [::]:0 LISTENING 117384
Mind [::]
for port 8333
and [::1]
for port 8332
.
I am wondering what changes need to be made in order to reach the 8332
port of the node from another computer in the network.