I am running bitcoind on a DigitalOcean droplet with public IP address e.g. 1.1.1.11.1.1.1
.
I would like to connect to it via RPC from another DigitalOcean droplet with public IP address e.g. 2.2.2.22.2.2.2
.
~/.bitcoin/bitcoin.conf
on 1.1.1.11.1.1.1
:
netstat -ln | grep 8332
on 1.1.1.11.1.1.1
yields:
RPC commands on 1.1.1.11.1.1.1
such as ./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=localhost -rpcport=8332 getnetworkinfo
return normally.
However, on machine 2.2.2.22.2.2.2
, when I run ./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=1.1.1.1 -rpcport=8332 getnetworkinfo
I get:
Machine 1.1.1.11.1.1.1
has firewall rules in DigitalOcean as follows:
Note that SSH into 1.1.1.11.1.1.1
from 2.2.2.22.2.2.2
is working just fine.
sudo iptables -L
on 1.1.1.11.1.1.1
gives: