<p>Connection refused means there's something prevents reaching your server. </p>

<p>make sure that your firewall allowing connections to your port and try to add this line to your bitcoin config: </p>

<pre><code>rpcallowip=0.0.0.0/0
</code></pre>

CC BY-SA 3.0
2018-04-25T05:32:00.550Z
i have add this line i n my config. in the debug log: 2018-04-25 05:11:38 Bound to [::]:18333
2018-04-25 05:11:38 Bound to 0.0.0.0:18333 but the Connection refused (111) are still there. my firewall I deactivated and the port 18333 is open. i have check under yougetsignal.com. in the debug.log have i updatetip: new best=00000000000000bd6da9189e324ba9852ea348c27f392b06a31429c783470020 height=1294289 version=0x20000000 log2_work=69.90756 tx=17934320 date='2018-04-25 05:20:26' progress=1.000000 cache=0.0MiB(356txo) Does not he get a connection to all nodes?
Michael Vogel
CC BY-SA 4.0
2022-11-06T06:35:09.067Z
no dont do this, you will allow anyone to control your  client
I Like
CC BY-SA 3.0
2018-04-25T04:47:47.737Z
2018-04-25T04:47:47.737Z
Tailer
<p>bitcoin-cli  -rpcbind=0.0.0.0  it works like charm </p>

CC BY-SA 4.0
2020-02-07T09:50:10.150Z
This is a bad idea. Exposing your control interface to the world is never going to be secure.
Claris
CC BY-SA 4.0
2020-02-06T10:56:56.183Z
2020-02-06T10:56:56.183Z
Karthik
<p>Try to put rpcbind=0.0.0.0 in your bitcoin.conf file, it worked for me.</p>

CC BY-SA 4.0
2020-11-02T12:10:27.487Z
If you read this, don't do it. It might work but does expose a remote control of your node to [your local network and potentially] the world.
Antoine Poinsot
CC BY-SA 4.0
2020-12-16T20:22:34.697Z
It is just a testnet.
Allan Romanato
CC BY-SA 4.0
2023-09-11T19:04:42.527Z
I see everyone saying not to do this, but maybe you can also share the correct way to do it.
F. Santiago
CC BY-SA 4.0
2019-08-16T18:20:39.913Z
2019-08-16T18:20:39.913Z
Allan Romanato
<p>I have ah Raspberry and i will a BTC &amp; Lightning node set up.</p>
<p>my bitcoin.conf</p>
<pre><code>testnet=3 
Bitcoind options
server=1
daemon=1
txindex=1
disablewallet=1 
 Connection settings
rpcuser=raspibolt
rpcpassword=1212431
addnode=104.237.131.138
addnode=151.80.205.132
addnode=192.155.82.123
addnode=74.220.255.190
addnode=80.100.203.151
 Raspberry Pi optimizations
dbcache=100
maxorphantx=10
maxmempool=50
maxconnections=40
maxuploadtarget=5000
</code></pre>
<p>I have the addnode from this thread:</p>
<p><a href="https://bitcoin.stackexchange.com/questions/73607/testnet3-node-sync-process-is-very-slow">testnet3 node sync process is very slow</a></p>
<p>in the getnetworkinfo stands:</p>
<pre><code>&quot;version&quot;: 160000,
  &quot;subversion&quot;: &quot;/Satoshi:0.16.0/&quot;,
  &quot;protocolversion&quot;: 70015,
  &quot;localservices&quot;: &quot;000000000000040d&quot;,
  &quot;localrelay&quot;: true,
  &quot;timeoffset&quot;: 0,
  &quot;networkactive&quot;: true,
  &quot;connections&quot;: 17,
  &quot;networks&quot;: 
  &quot;warnings&quot;: &quot;Warning: unknown new rules activated (versionbit 28)&quot;
</code></pre>
<p>and in the debug log stands:</p>
<pre><code>2018-04-24 17:39:51 connect() to 85.207.214.190:18333 failed after select(): Connection refused (111)
2018-04-24 17:38:16 connect() to [2001:470:c144:cafe::a]:18333 failed: Network is unreachable (101)
</code></pre>
<p>anyone have an idea where the error lies?</p>
<p>my testnet port: 18333 is open.</p>
<p>many thanks for the help!</p>
<p>regards</p>

CC BY-SA 3.0
2018-04-24T18:39:52.287Z
How much time did you give it? Could take a while until it finds peers on testnet. Both errors in your log aren't to uncommon.
0xb10c
CC BY-SA 3.0
2018-04-24T18:57:34.177Z
several days. in the debug have i peer conection:
2018-04-24 18:41:24 New outbound peer connected: version: 70015, blocks=1294178, peer=10
2018-04-24 18:41:24 New outbound peer connected: version: 70015, blocks=1294178, peer=11
2018-04-24 18:41:25 New outbound peer connected: version: 70015, blocks=1294178, peer=12
can i switch to mainnet with this error? thank for you help :)
Michael Vogel
CC BY-SA 3.0
2018-04-24T20:17:02.837Z
What error? Those debug.log lines are pretty standard to see, you'll see them as nodes that were online go offline. You have active connections, what is the problem?
Ava Chow
CC BY-SA 3.0
2018-04-25T05:27:11.677Z
the error in the debug.log irritated me. connect() to 115.68.73.83:18333 failed after select(): No route to host (113)
is this not bad?
Michael Vogel
<full-node>
Testnet Bitcoin Connection refused (111)
Michael Vogel
# Testnet Bitcoin Connection refused (111)

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

I have ah Raspberry and i will a BTC & Lightning node set up.
my bitcoin.conf
testnet=3 
Bitcoind options
server=1
daemon=1
txindex=1
disablewallet=1 
 Connection settings
rpcuser=raspibolt
rpcpassword=1212431
addnode=104.237.131.138
addnode=151.80.205.132
addnode=192.155.82.123
addnode=74.220.255.190
addnode=80.100.203.151
 Raspberry Pi optimizations
dbcache=100
maxorphantx=10
maxmempool=50
maxconnections=40
maxuploadtarget=5000

I have the addnode from this thread:
testnet3 node sync process is very slow
in the getnetworkinfo stands:
"version": 160000,
  "subversion": "/Satoshi:0.16.0/",
  "protocolversion": 70015,
  "localservices": "000000000000040d",
  "localrelay": true,
  "timeoffset": 0,
  "networkactive": true,
  "connections": 17,
  "networks": 
  "warnings": "Warning: unknown new rules activated (versionbit 28)"

and in the debug log stands:
2018-04-24 17:39:51 connect() to 85.207.214.190:18333 failed after select(): Connection refused (111)
2018-04-24 17:38:16 connect() to [2001:470:c144:cafe::a]:18333 failed: Network is unreachable (101)

anyone have an idea where the error lies?
my testnet port: 18333 is open.
many thanks for the help!
regards

**Tags:** full-node

> **Comments:**
> **username_1**: How much time did you give it? Could take a while until it finds peers on testnet. Both errors in your log aren't to uncommon.  
> **username_0**: several days. in the debug have i peer conection: 2018-04-24 18:41:24 New outbound peer connected: version: 70015, blocks=1294178, peer=10 2018-04-24 18:41:24 New outbound peer connected: version: 70015, blocks=1294178, peer=11 2018-04-24 18:41:25 New outbound peer connected: version: 70015, blocks=1294178, peer=12 can i switch to mainnet with this error? thank for you help :)  
> **username_2**: What error? Those debug.log lines are pretty standard to see, you'll see them as nodes that were online go offline. You have active connections, what is the problem?  
> **username_0**: the error in the debug.log irritated me. connect() to 115.68.73.83:18333 failed after select(): No route to host (113) is this not bad?  

---

## 3 answers

### Answer by username_3 on 2018-04-25. Score: 0

Connection refused means there's something prevents reaching your server. 
make sure that your firewall allowing connections to your port and try to add this line to your bitcoin config: 
rpcallowip=0.0.0.0/0

> **Comments:**
> **username_0**: i have add this line i n my config. in the debug log: 2018-04-25 05:11:38 Bound to [::]:18333 2018-04-25 05:11:38 Bound to 0.0.0.0:18333 but the Connection refused (111) are still there. my firewall I deactivated and the port 18333 is open. i have check under yougetsignal.com. in the debug.log have i updatetip: new best=00000000000000bd6da9189e324ba9852ea348c27f392b06a31429c783470020 height=1294289 version=0x20000000 log2_work=69.90756 tx=17934320 date='2018-04-25 05:20:26' progress=1.000000 cache=0.0MiB(356txo) Does not he get a connection to all nodes?  
> **username_4**: no dont do this, you will allow anyone to control your  client  

---

### Answer by username_5 on 2020-02-06. Score: -1

bitcoin-cli -rpcbind=0.0.0.0 it works like charm

> **Comments:**
> **username_6**: This is a bad idea. Exposing your control interface to the world is never going to be secure.  

---

### Answer by username_7 on 2019-08-16. Score: -2

Try to put rpcbind=0.0.0.0 in your bitcoin.conf file, it worked for me.

> **Comments:**
> **username_8**: If you read this, don't do it. It might work but does expose a remote control of your node to [your local network and potentially] the world.  
> **username_7**: It is just a testnet.  
> **username_9**: I see everyone saying not to do this, but maybe you can also share the correct way to do it.  

---

