Related eBooks

I have set up bitcoind, and I am able to run bitcoin-cli commands, I am also able to make request through RPC.

curl –user username:password –data-binary ‘{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }’ -H ‘content-type: text/plain;’ http://127.0.0.1:18332

It also works. But connecting through the public ip just return Connection refused.

curl –user username:password –data-binary ‘{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }’ -H ‘content-type: text/plain;’ http://public-ip:18332

It returns

curl: (7) Failed to connect to external-ip port 18332: Connection refused

Config file as follows.

server=1

rpcport=9776

rpcallowip=0.0.0.0/0

rpcbind=0.0.0.0

txindex=1

source

By pplny

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

Translate »