Hacker's Cookbook
Making Bitcoin Core Accessible from Another Computer on the LAN
Set the bitcoin.conf
file as the following
rpcbind=127.0.0.1
rpcbind=192.168.1.2
rpcallowip=192.168.1.2
rpcallowip=192.168.1.3
debug=http
server=1
rest=1
txindex=1
rpcworkqueue=100
where 192.168.1.2
is the IP address of the computer where Bitcoin Core
is running, and 192.168.1.3
is the IP address of the computer where
you want to query Bitcoin Core.
Alternatively you can use 192.168.1.1/24
to allow every computer in the subnet to query Bitcoin Core,
at the cost of less restricted access.
To check if the node is accessible, on the host machine you can run the following to check if Bitcoin Core is correctly listening on the given port:
> netstat -aonq | findstr 8332
TCP 127.0.0.1:8332 0.0.0.0:0 LISTENING 64324
TCP 192.168.1.2:8332 0.0.0.0:0 LISTENING 64324
if the output of this command is at the following, it indicates that
Bitcoin Core is listening on localhost
and the port is not reachable
from any other computer.
In this case, make sure the above configuration
is set correctly, the rpcbind
parameter specifically.
> netstat -aonq | findstr 8332
TCP 127.0.0.1:8332 0.0.0.0:0 LISTENING 2416
TCP [::1]:8332 [::]:0 LISTENING 2416
On the client machine you can run the following to check if the port is open and accessible:
> nc -z 192.168.1.2 8332
Connection to 192.168.1.2 port 8332 (tcp/*) succeeded!
Read more about networking or related security details.
Some blocks for debugging
-
There are many transactions where they create many outputs with 0 value. For instance, the transaction with id
ceb1a7fb57ef8b75ac59b56dd859d5cb3ab5c31168aa55eb3819cd5ddbd3d806
belonging to the block with height123573
, contains279
outputs with value0
. -
Examples of some bad/strange transactions:
- 71036 (search for txes in this block)
- 268449
- 565912
- 706953
- 774532
- 710061 (some execution path related to this are currently not implemented)