bitcoind – Cannot hook up with Bitcoin RPC on DigitalOcean server

0
74


I’m operating bitcoind on a DigitalOcean droplet with public IP deal with e.g. 1.1.1.1.

I want to hook up with it by way of RPC from one other DigitalOcean droplet with public IP deal with e.g. 2.2.2.2.

Each Droplets are operating Ubuntu Linux 18.04.

~/.bitcoin/bitcoin.conf on 1.1.1.1:

datadir=/mnt/vol1
disablewallet=1
rpcbind=1.1.1.1
rpcuser=x
rpcpassword=x
rpcallowip=2.2.2.2/32
server=1

netstat -ln | grep 8332 on 1.1.1.1 yields:

tcp        0      0 127.0.0.1:8332          0.0.0.0:*               LISTEN
tcp6       0      0 ::1:8332                :::*                    LISTEN

RPC instructions on 1.1.1.1 akin to ./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=localhost -rpcport=8332 getnetworkinfo return usually.

Nonetheless, on machine 2.2.2.2, after I run ./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=1.1.1.1 -rpcport=8332 getnetworkinfo I get:

error: Couldn't hook up with the server 1.1.1.1:8332

Be sure that the bitcoind server is operating and that you're connecting to the proper RPC port.

Machine 1.1.1.1 has firewall guidelines in DigitalOcean as follows:

Kind        Protocol        Port Vary      Sources
SSH         TCP             22              2.2.2.2/32
Customized      TCP             8332            2.2.2.2/32

Observe that SSH into 1.1.1.1 from 2.2.2.2 is working simply fantastic.

sudo iptables -L on 1.1.1.1 offers:

Chain INPUT (coverage ACCEPT)
goal     prot choose supply               vacation spot

Chain FORWARD (coverage ACCEPT)
goal     prot choose supply               vacation spot

Chain OUTPUT (coverage ACCEPT)
goal     prot choose supply               vacation spot   

Is there something clearly improper in my configuration or setup?

Working curl -v 1.1.1.1:8332 on 2.2.2.2 instantly returns with:

* Rebuilt URL to: 1.1.1.1:8332/
*   Making an attempt 1.1.1.1...
* hook up with 1.1.1.1 port 8332 failed: Connection refused
* Failed to connect with 1.1.1.1 port 8332: Connection refused
* Closing connection 0
curl: (7) Failed to connect with 1.1.1.1 port 8332: Connection refused

which from what I’ve learn seemingly signifies a firewall subject.

LEAVE A REPLY

Please enter your comment!
Please enter your name here