<p>I could never get this to work. So as a work-around, I port forwarded <code>http</code> and <code>https</code>, and made and <code>http</code> endpoint that in turn called the function in question and returned the result. A roll-your-own <code>http</code> wrapper around <code>bitcoind</code>, because I couldn't get the <code>bitcoind http</code> server to accept a connection coming in from the outside to my router. This is not ideal, since I must turn off VPN to get even this to work.</p>

<p>I can tell by the settings available in <code>bitcoin.conf</code> that this functionality was intended to be possible. Therefore, I see this as a documentation failure. Someone somewhere knows how to do this, and I'm sure it's trivial to them, but it's a well kept secret.</p>

<p>I request an example of specifically this be added to <code>bitcoin.org</code>, since this is functionality intended to be possible.</p>

CC BY-SA 4.0
2018-04-30T21:37:12.577Z
2018-05-31T17:47:22.263Z
2018-05-31T17:47:22.263Z
toddmo
<p>For testing purposes, I need to connect from a web page in my shared hosting account (on the public internet) to my json rpc server which is running on my laptop . So bitcoind is running on my laptop, which is behind my router, and I have a shared web hosting account with easybitcoin.php running on it.</p>

<p><a href="https://i.sstatic.net/j4j49.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/j4j49.png" alt="enter image description here"></a></p>

<p>Let's say my router's public IP is 1.2.3.4, and the web server (where easybitcoin.php lives)'s IP address is 5.6.7.8, and my laptop LAN address is 192.168.1.99</p>

<p>The error I get is </p>

<blockquote>
  <p>Failed to connect to 1.2.3.4 port 8332: Connection refused</p>
</blockquote>

<p><strong>bitcoin.conf</strong></p>

<pre><code>server=1
rpcallowip=5.6.7.8
rpcport=8332
</code></pre>

<p><strong>Router Port Forwarding</strong></p>

<p><a href="https://i.sstatic.net/ZEIXL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZEIXL.png" alt="enter image description here"></a></p>

<p><strong>Firewall</strong></p>

<p>Down. I checked it at the router and on the laptop (where there is an exception for bitcoind).</p>

<p><strong>DMZ</strong></p>

<p>Laptop is in the router's DMZ.</p>

<p><strong>VPN</strong></p>

<p>off</p>

<p><strong>Online Port Scanner Check (looks good)</strong></p>

<pre><code>Result: 1.2.3.4 is listening on port 8332
</code></pre>

<p><strong>Going to <a href="http://192.168.1.99:8332/" rel="nofollow noreferrer">http://192.168.1.99:8332/</a> from inside the LAN (looks good)</strong></p>

<pre><code>JSONRPC server handles only POST requests
</code></pre>

<p><strong>Going to <a href="http://1.2.3.4:8332/" rel="nofollow noreferrer">http://1.2.3.4:8332/</a> from inside the LAN</strong></p>

<pre><code>A connection attempt timed out.
</code></pre>

<p><strong>Going to <a href="http://1.2.3.4:8332/" rel="nofollow noreferrer">http://1.2.3.4:8332/</a> from the public internet (I made an rpcallowip=IP of the testing website)</strong></p>

<pre><code>403 Response (0 characters)
</code></pre>

<p><strong>Going to <a href="http://1.2.3.4:8330/" rel="nofollow noreferrer">http://1.2.3.4:8330/</a> from the public internet (bogus port)</strong></p>

<pre><code>Connection timed out.
</code></pre>

<p>Once I get this working I will go back and tighten everything back up. But I need to get it working first. I must be missing something.</p>

CC BY-SA 3.0
2018-04-27T03:28:43.933Z
try to add: rpcallowip=0.0.0.0/0 instead of your IP address and see if it works.
Tailer
CC BY-SA 4.0
2018-05-31T02:13:34.217Z
Do you have a dedicated IP address? Most people have a dynamic IP with their ISP which makes things like this difficult. Look into a dynamic DNS service which will give you a static IP to provide to the internet, but will change in sync when your IP changes. The only way I've been able to make my laptop accessible to the public internet is by doing what you describe below in your answer by putting it behind a web server like wamp.
m1xolyd1an
CC BY-SA 4.0
2018-05-31T17:46:37.457Z
@m1xolyd1an, I don't think I do, but my provider hasn't changed my address in a year now. So for my purposes, my provider ip is static. My VPN IP might stay the same if I keep choosing the same VPN server to go through. But I have not looked into that since I turn it off when I want this functionality.
toddmo
<json-rpc><network><connection>
Error connecting to json rpc server
toddmo
# Error connecting to json rpc server

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

For testing purposes, I need to connect from a web page in my shared hosting account (on the public internet) to my json rpc server which is running on my laptop . So bitcoind is running on my laptop, which is behind my router, and I have a shared web hosting account with easybitcoin.php running on it.

[![enter image description here](https://i.sstatic.net/j4j49.png)](https://i.sstatic.net/j4j49.png)

Let's say my router's public IP is 1.2.3.4, and the web server (where easybitcoin.php lives)'s IP address is 5.6.7.8, and my laptop LAN address is 192.168.1.99

The error I get is

> Failed to connect to 1.2.3.4 port 8332: Connection refused

**bitcoin.conf**

```
server=1
rpcallowip=5.6.7.8
rpcport=8332

```

**Router Port Forwarding**

[![enter image description here](https://i.sstatic.net/ZEIXL.png)](https://i.sstatic.net/ZEIXL.png)

**Firewall**

Down. I checked it at the router and on the laptop (where there is an exception for bitcoind).

**DMZ**

Laptop is in the router's DMZ.

**VPN**

off

**Online Port Scanner Check (looks good)**

```
Result: 1.2.3.4 is listening on port 8332

```

**Going to <http://192.168.1.99:8332/> from inside the LAN (looks good)**

```
JSONRPC server handles only POST requests

```

**Going to <http://1.2.3.4:8332/> from inside the LAN**

```
A connection attempt timed out.

```

**Going to <http://1.2.3.4:8332/> from the public internet (I made an rpcallowip=IP of the testing website)**

```
403 Response (0 characters)

```

**Going to <http://1.2.3.4:8330/> from the public internet (bogus port)**

```
Connection timed out.

```

Once I get this working I will go back and tighten everything back up. But I need to get it working first. I must be missing something.

**Tags:** json-rpc, network, connection

> **Comments:**
> **username_1**: try to add: rpcallowip=0.0.0.0/0 instead of your IP address and see if it works.  
> **username_2**: Do you have a dedicated IP address? Most people have a dynamic IP with their ISP which makes things like this difficult. Look into a dynamic DNS service which will give you a static IP to provide to the internet, but will change in sync when your IP changes. The only way I've been able to make my laptop accessible to the public internet is by doing what you describe below in your answer by putting it behind a web server like wamp.  
> **username_0**: @username_2, I don't think I do, but my provider hasn't changed my address in a year now. So for my purposes, my provider ip is static. My VPN IP might stay the same if I keep choosing the same VPN server to go through. But I have not looked into that since I turn it off when I want this functionality.  

---

## 1 answers

### Answer by username_0 on 2018-04-30. Score: 0 | Accepted answer

I could never get this to work. So as a work-around, I port forwarded `http` and `https`, and made and `http` endpoint that in turn called the function in question and returned the result. A roll-your-own `http` wrapper around `bitcoind`, because I couldn't get the `bitcoind http` server to accept a connection coming in from the outside to my router. This is not ideal, since I must turn off VPN to get even this to work.

I can tell by the settings available in `bitcoin.conf` that this functionality was intended to be possible. Therefore, I see this as a documentation failure. Someone somewhere knows how to do this, and I'm sure it's trivial to them, but it's a well kept secret.

I request an example of specifically this be added to `bitcoin.org`, since this is functionality intended to be possible.


---

