I am running bitcoind on a DigitalOcean droplet with public IP address e.g.
I would like to connect to it via RPC from another DigitalOcean droplet with public IP address e.g.
Both Droplets are running Ubuntu Linux 18.04.
datadir=/mnt/vol1 disablewallet=1 rpcbind=220.127.116.11 rpcuser=x rpcpassword=x rpcallowip=18.104.22.168/32 server=1
netstat -ln | grep 8332 on
tcp 0 0 127.0.0.1:8332 0.0.0.0:* LISTEN tcp6 0 0 ::1:8332 :::* LISTEN
RPC commands on
22.214.171.124 such as
./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=localhost -rpcport=8332 getnetworkinfo return normally.
However, on machine
126.96.36.199, when I run
./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=188.8.131.52 -rpcport=8332 getnetworkinfo I get:
error: Could not connect to the server 184.108.40.206:8332 Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
220.127.116.11 has firewall rules in DigitalOcean as follows:
Type Protocol Port Range Sources SSH TCP 22 18.104.22.168/32 Custom TCP 8332 22.214.171.124/32
Note that SSH into
126.96.36.199 is working just fine.
sudo iptables -L on
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
Is there anything obviously wrong in my configuration or setup?
curl -v 188.8.131.52:8332 on 184.108.40.206 immediately returns with:
* Rebuilt URL to: 220.127.116.11:8332/ * Trying 18.104.22.168... * connect to 22.214.171.124 port 8332 failed: Connection refused * Failed to connect to 126.96.36.199 port 8332: Connection refused * Closing connection 0 curl: (7) Failed to connect to 188.8.131.52 port 8332: Connection refused
which from what I have read likely indicates a firewall issue.