<p>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). </p>

<p>Here is what i have done</p>

<p>Bitcoin Core Config File</p>

<pre><code>deprecatedrpc=1
dbcache=1000
txindex=1
server=1
rpcuser=myusername
rpcpassword=mypassword
rpcport=8332
rpcallowip = 192.185.35.200
</code></pre>

<p>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</p>

<p>I also disabled firewall totally on the windows machine</p>

<p>I specified compute engine firewall rule to allow access for TCP port 8332 and 8333</p>

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

<p><a href="https://www.yougetsignal.com/tools/open-ports/" rel="nofollow noreferrer">https://www.yougetsignal.com/tools/open-ports/</a> shows the 2 port as opened</p>

<p>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.</p>

<pre><code>&lt;?php

include('easybitcoin.php');

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

$info = $bitcoin-&gt;getinfo();

print_r($info);


?&gt;
</code></pre>

<p>What am i missing</p>

CC BY-SA 3.0
2018-04-13T22:39:23.897Z
try to allow all IP's instead of a specific IP , `rpcallowip=0.0.0.0/0`
Tailer
CC BY-SA 3.0
2018-04-14T07:34:20.403Z
I did that already in the bitcoin config file
Ola Fashade Samson
CC BY-SA 3.0
2018-04-14T08:29:29.820Z
To be specific about the error, bitcoind was returning HTTP Unauthorized error
Ola Fashade Samson
CC BY-SA 3.0
2018-04-14T14:37:46.983Z
You mentioned in your question that bitcoind returning `Couldn't connect to host`, for the new error please edit the question.
Tailer
<bitcoin-core><bitcoind><bitcoin-core-development>
Trying to connect to bitcoin core on Google Compute Engine from an external IP, I was getting "couldn't connect to host error"
Ola Fashade Samson
# Trying to connect to bitcoin core on Google Compute Engine from an external IP, I was getting "couldn't connect to host error"

(Asked by: username_0 on 2018-04-13)

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.
getinfo();

print_r($info);


?>

What am i missing

**Tags:** bitcoin-core, bitcoind, bitcoin-core-development

> **Comments:**
> **username_1**: try to allow all IP's instead of a specific IP , `rpcallowip=0.0.0.0/0`  
> **username_0**: I did that already in the bitcoin config file  
> **username_0**: To be specific about the error, bitcoind was returning HTTP Unauthorized error  
> **username_1**: You mentioned in your question that bitcoind returning `Couldn't connect to host`, for the new error please edit the question.  

---

## 0 answers

