<p>If your server is behind a NAT or otherwise does not have <code>94.183.32.151</code> as the IP address for one of the network interfaces, then <code>rpcbind=94.183.32.151</code> won't work. You can check what IP addresses your node actually has using <code>ifconfig</code> and then <code>rpcbind=&lt;ip&gt;</code> for one of those.</p>

<p>For example, because my node is behind my router's NAT, I have to do <code>rpcbind=192.168.1.2</code> instead of binding to my external IP of <code>12.34.56.78</code>.</p>

CC BY-SA 4.0
2020-02-09T11:17:42.833Z
We are not behind a NAT and the given IP is the true one.
Mohammad Saberi
CC BY-SA 4.0
2020-02-09T10:48:26.303Z
2020-02-09T10:48:26.303Z
Ava Chow
<p>I've lunched a Bitcoin Core server, and trying to connect to it via JSON-RPC.
This is my configuration settings:</p>

<pre><code>server=1  
rpcuser=admin  
rpcpassword=password
rpcport=1234
rpcallowip=94.183.32.151
</code></pre>

<p>But all cURL connections to this server via the IP 94.183.32.151 has the same error result as:   </p>

<p><code>cURL error 7: Failed to connect to 94.183.32.151 port 1234: Connection refused</code></p>

<p>I tried adding this option too, but it did not solve the problem:<br>
<code>rpcbind:94.183.32.151</code></p>

<p>Only when I put <code>0.0.0.0</code> as a bined RPC IP, Bitcoin core returns true response. I've checked many pages but did not find any other appropriate way to allow some certain IPs to Bitcoind. May you help me please?  </p>

<p>Note: IP, Port number, username and password are changed from real values.</p>

CC BY-SA 4.0
2020-02-09T10:48:38.370Z
You should never, ever be exposing your RPC port. You wouldn't pass your banking information in cleartext, why would you do the same with your bitcoin credentials? The option shouldn't be in Bitcoin Core at all honestly.
Claris
CC BY-SA 4.0
2020-02-09T11:30:16.917Z
@Anonymous, we defined a secret port number for JSON RPC connections, and only we know what is it. What's the problem here?
Mohammad Saberi
CC BY-SA 4.0
2020-02-09T11:39:27.117Z
It takes tens of seconds scan all 65535 ports on a host. The entire internet, every one of the 281474976710656 ports, is scanned constantly, even by public services like shodan.io. The idea that your port is "secret" is comical, especially in the context of it being a security measure.
Claris
CC BY-SA 4.0
2020-02-09T11:42:26.097Z
Our platform is on the server 1 and the Bitcoin core has installed on the server 2. We receive requests from users on the server 1 and have to ask server 2 to do them. Do you have any other solution?
Mohammad Saberi
CC BY-SA 4.0
2020-02-09T11:43:44.013Z
If your solution is to transmit key material in plaintext over the internet, maybe you should find a job that isn't engineering security sensitive services that handle other people's money. Assuming you don't take that advice, consider using a VPN to connect the two together.
Claris
<bitcoind><json-rpc><connection>
Bitcoin Core JSONRPC only accept requests with 0.0.0.0 in configs
Mohammad Saberi
# Bitcoin Core JSONRPC only accept requests with 0.0.0.0 in configs

(Asked by: username_0 on 2020-02-09)

I've lunched a Bitcoin Core server, and trying to connect to it via JSON-RPC.
This is my configuration settings:
server=1  
rpcuser=admin  
rpcpassword=password
rpcport=1234
rpcallowip=94.183.32.151

But all cURL connections to this server via the IP 94.183.32.151 has the same error result as:   
cURL error 7: Failed to connect to 94.183.32.151 port 1234: Connection refused
I tried adding this option too, but it did not solve the problem:
rpcbind:94.183.32.151
Only when I put 0.0.0.0 as a bined RPC IP, Bitcoin core returns true response. I've checked many pages but did not find any other appropriate way to allow some certain IPs to Bitcoind. May you help me please?  
Note: IP, Port number, username and password are changed from real values.

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

> **Comments:**
> **username_1**: You should never, ever be exposing your RPC port. You wouldn't pass your banking information in cleartext, why would you do the same with your bitcoin credentials? The option shouldn't be in Bitcoin Core at all honestly.  
> **username_0**: @Anonymous, we defined a secret port number for JSON RPC connections, and only we know what is it. What's the problem here?  
> **username_1**: It takes tens of seconds scan all 65535 ports on a host. The entire internet, every one of the 281474976710656 ports, is scanned constantly, even by public services like shodan.io. The idea that your port is "secret" is comical, especially in the context of it being a security measure.  
> **username_0**: Our platform is on the server 1 and the Bitcoin core has installed on the server 2. We receive requests from users on the server 1 and have to ask server 2 to do them. Do you have any other solution?  
> **username_1**: If your solution is to transmit key material in plaintext over the internet, maybe you should find a job that isn't engineering security sensitive services that handle other people's money. Assuming you don't take that advice, consider using a VPN to connect the two together.  

---

## 1 answers

### Answer by username_2 on 2020-02-09. Score: 0

If your server is behind a NAT or otherwise does not have `94.183.32.151` as the IP address for one of the network interfaces, then `rpcbind=94.183.32.151` won't work. You can check what IP addresses your node actually has using `ifconfig` and then `rpcbind=` for one of those.

For example, because my node is behind my router's NAT, I have to do `rpcbind=192.168.1.2` instead of binding to my external IP of `12.34.56.78`.

> **Comments:**
> **username_0**: We are not behind a NAT and the given IP is the true one.  

---

