<p>Bitcoin disallows rpc requests from IP addresses other than <code>127.0.0.1</code> Try adding </p>

<p><code>rpcallowip=&lt;your ip addres&gt;</code> </p>

<p>to your bitcoin configuration file. </p>

<p><a href="https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments" rel="noreferrer">More info</a></p>

CC BY-SA 3.0
2013-02-20T05:57:20.550Z
Already did that, still not working...I have it set to rpcallowip=*
ZenBalance
CC BY-SA 3.0
2013-02-20T06:34:01.187Z
@ZenBalance Hmmm. Can you post your curl command?
Nick ODell
CC BY-SA 3.0
2013-02-20T07:39:07.577Z
curl --user <user> --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' <ip address:port>
ZenBalance
CC BY-SA 3.0
2013-02-20T04:24:24.473Z
2013-02-20T04:24:24.473Z
Nick ODell
<p>Answer: It ends up that the firewall setting for the network were set in such a way that they were blocking the connection even though the port was open on the computer.</p>

<p>For those who also run into this problem:</p>

<p>-If you curl the server and the connection is instantly refused, then you need to open up the port in your ip tables.</p>

<p>-If your curl hangs like mine above and/or returns a curl: (7) error like above (and you have verified that both the rpc curl from the localhost of the bitcoind server is working and another port on the bitcoind server can be pinged remotely) then you probably have either computer firewall or network firewall settings blocking your port.</p>

CC BY-SA 3.0
2013-02-21T19:19:24.927Z
2013-02-21T19:19:24.927Z
ZenBalance
<p>I have been trying to connect to a remote bitcoind -daemon running server. I can access it with the curl command explained at the end of the page here (<a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)" rel="noreferrer">https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)</a>) by putting in the correct port number, but when I try to call from a remote host, I get a:</p>

<pre><code>curl: (7) couldn't connect to host
</code></pre>

<p>error</p>

<p>I checked with netstat and it looks like bitcoind is listening on the port (otherwise I wouldn't be able to do rpc locally), and accepting all incoming IP addresses.</p>

<p>My bitcoin.config file also allows for all IP addresses and rpc (no ssl, although if anyone has a detailed decscription of how ).</p>

<p>I also made sure that I opened up a TCP port.</p>

<p>Here's the curl command I'm using:</p>

<pre><code>curl --user &lt;user&gt; --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' &lt;ip address:port&gt;
</code></pre>

<p>Does anyone know what else might be wrong?</p>

<bitcoind><json-rpc>
Errors Connecting to Bitcoind Server with RPC
ZenBalance
# Errors Connecting to Bitcoind Server with RPC

(Asked by: username_0 on 2013-02-20)

I have been trying to connect to a remote bitcoind -daemon running server. I can access it with the curl command explained at the end of the page here (<https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)>) by putting in the correct port number, but when I try to call from a remote host, I get a:

```
curl: (7) couldn't connect to host

```

error

I checked with netstat and it looks like bitcoind is listening on the port (otherwise I wouldn't be able to do rpc locally), and accepting all incoming IP addresses.

My bitcoin.config file also allows for all IP addresses and rpc (no ssl, although if anyone has a detailed decscription of how ).

I also made sure that I opened up a TCP port.

Here's the curl command I'm using:

```
curl --user <user> --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' <ip address:port>

```

Does anyone know what else might be wrong?

**Tags:** bitcoind, json-rpc


---

## 2 answers

### Answer by username_0 on 2013-02-21. Score: 4 | Accepted answer

Answer: It ends up that the firewall setting for the network were set in such a way that they were blocking the connection even though the port was open on the computer.

For those who also run into this problem:

-If you curl the server and the connection is instantly refused, then you need to open up the port in your ip tables.

-If your curl hangs like mine above and/or returns a curl: (7) error like above (and you have verified that both the rpc curl from the localhost of the bitcoind server is working and another port on the bitcoind server can be pinged remotely) then you probably have either computer firewall or network firewall settings blocking your port.


---

### Answer by username_1 on 2013-02-20. Score: 5

Bitcoin disallows rpc requests from IP addresses other than `127.0.0.1` Try adding

`rpcallowip=<your ip addres>`

to your bitcoin configuration file.

[More info](https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments)

> **Comments:**
> **username_0**: Already did that, still not working...I have it set to rpcallowip=*  
> **username_1**: @username_0 Hmmm. Can you post your curl command?  
> **username_0**: curl --user <user> --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' <ip address:port>  

---

