<p>Without indication if your <code>bitcoin.conf</code> belongs to the client or server, I leave you some guidance on what to check:</p>
<ul>
<li><p>Make sure your <b>server</b> <code>bitcoin.conf</code> has the following line:</p>
<p><code>rpcallowip=your.client.ip.address</code></p>
</li>
<li><p>Both <b>server and client</b> <code>bitcoin.conf</code> should contain the same <code>rpcuser</code> and <code>rpcpassword</code> lines</p>
<p><code>rpcuser=foo</code><br>
<code>rpcpassword=bar</code></p>
</li>
<li><p>Make sure your <B>client</b> <code>bitcoin.conf</code> has the following line:</p>
<p><code>rpcconnect=your.server.ip.address</code></p>
</li>
</ul>

CC BY-SA 3.0
2016-03-12T23:23:45.197Z
2016-03-12T23:23:45.197Z
2020-06-16T11:10:03.350Z
kha0S
<p>Here is my bitcoin.conf</p>

<pre><code>server=1
rpcuser=root
rpcpassword=passwordhere
rpcconnect=75.74.28.1.2 (last 2 digits randomized for security).
rpcport=8332
rpcallowip=107.180.44.217
</code></pre>

<p>So whats the issue? When I run it via localhost it is able to connect. Externally it isn't. Ports are forwarded and are open.</p>

CC BY-SA 3.0
2016-03-06T09:00:32.657Z
Just checking: your rpcconnect ip address has 5 numbers...
Jannes
CC BY-SA 3.0
2016-03-06T20:27:56.913Z
yeah thats normal lol. just randomized it
stackoverflowsucks
CC BY-SA 3.0
2016-07-11T09:35:28.863Z
Don't open the RPC server to the public internet. Use VPN or a reverse proxy: check https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.12.0.md#rpc-ssl-support-dropped
Jonas Schnelli
<bitcoind><bitcoin-core>
Connection refused from external server
stackoverflowsucks
# Connection refused from external server

(Asked by: username_0 on 2016-03-06)

Here is my bitcoin.conf
server=1
rpcuser=root
rpcpassword=passwordhere
rpcconnect=75.74.28.1.2 (last 2 digits randomized for security).
rpcport=8332
rpcallowip=107.180.44.217

So whats the issue? When I run it via localhost it is able to connect. Externally it isn't. Ports are forwarded and are open.

**Tags:** bitcoind, bitcoin-core

> **Comments:**
> **username_1**: Just checking: your rpcconnect ip address has 5 numbers...  
> **username_0**: yeah thats normal lol. just randomized it  
> **username_2**: Don't open the RPC server to the public internet. Use VPN or a reverse proxy: check https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.12.0.md#rpc-ssl-support-dropped  

---

## 1 answers

### Answer by username_3 on 2016-03-12. Score: 1

Without indication if your `bitcoin.conf` belongs to the client or server, I leave you some guidance on what to check:

* Make sure your **server** `bitcoin.conf` has the following line:

  `rpcallowip=your.client.ip.address`
* Both **server and client** `bitcoin.conf` should contain the same `rpcuser` and `rpcpassword` lines

  `rpcuser=foo`  
  `rpcpassword=bar`
* Make sure your **client** `bitcoin.conf` has the following line:

  `rpcconnect=your.server.ip.address`


---

