1

I have having issue connecting my bitcoincore from an external ip address (Hostgator to be specific). The Bitcoin core is hosted on Google Compute Engine (Windows Sever 2012).

Here is what i have done

Bitcoin Core Config File

deprecatedrpc=1
dbcache=1000
txindex=1
server=1
rpcuser=myusername
rpcpassword=mypassword
rpcport=8332
rpcallowip = 192.185.35.200

N.B 192.185.35.200 is the dedicated server IP on Hostgator. N.B 35.195.0.35 is the Ip for my VM on Google Compute Engine

I also disabled firewall totally on the windows machine

I specified compute engine firewall rule to allow access for TCP port 8332 and 8333

I contacted hostgator, they told me port 8332 is enabled for outgoing connections but not for incoming on shared server

https://www.yougetsignal.com/tools/open-ports/ shows the 2 port as opened

But still, i can't get JSONRPC to talk to the bitcoincore. What i am getting is "Could't connect to host" . When i make a call to with the EasyBitcoin Library.

<?php

include('easybitcoin.php');

$bitcoin = new Bitcoin('myusername','mypassword','35.195.0.35','8332');

$info = $bitcoin->getinfo();

print_r($info);


?>

What am i missing

  • try to allow all IP's instead of a specific IP , rpcallowip=0.0.0.0/0 – Adam Apr 13 '18 at 22:39
  • I did that already in the bitcoin config file – Ola Fashade Samson Apr 14 '18 at 7:34
  • To be specific about the error, bitcoind was returning HTTP Unauthorized error – Ola Fashade Samson Apr 14 '18 at 8:29
  • You mentioned in your question that bitcoind returning Couldn't connect to host, for the new error please edit the question. – Adam Apr 14 '18 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.