<p>You need to connect to a node which has:</p>

<ul>
<li>RPC enabled</li>
<li>username and password are known</li>
<li>client IPs are whitelisted using <code>rpcallowip</code></li>
<li>the router has its port forwarding enabled.</li>
</ul>

<p>Usually, public nodes don't share their RPC parameters, because that'd be very insecure. My advice is, run your own node. Otherwise, you could use the experimental <a href="https://github.com/lightninglabs/neutrino" rel="nofollow noreferrer">neutrino</a> client.</p>

CC BY-SA 4.0
2018-09-24T14:02:37.907Z
I forgot to update my question with the answer, turns out the public node I tried to connect to was down, and the 2nd node I spun up was still syncing and therefor wasn't up. I tried more than a few on the list until I found one that worked. I'll mark yours as correct as those are valid steps.
arshbot
CC BY-SA 4.0
2018-09-24T13:47:31.583Z
2018-09-24T13:47:31.583Z
MCCCS
<p>I'm getting connection refused when I try to connect to a public testnet node. </p>

<pre><code>lncli --network=testnet connect 022ff54505fe9b50ce6c3c99c645c9aab67fe91abb01504c5211045b82a09aa757@103.102.44.207:9735
</code></pre>

<p>Error</p>

<pre><code>[lncli] rpc error: code = Unknown desc = dial tcp 103.102.44.207:9735: connect: connection refused
</code></pre>

<lightning-network><lightning-network-daemon>
rpc error: code = Unknown desc = dial tcp 103.102.44.207:9735: connect: connection refused
arshbot
# rpc error: code = Unknown desc = dial tcp 103.102.44.207:9735: connect: connection refused

(Asked by: username_0 on 2018-09-23)

I'm getting connection refused when I try to connect to a public testnet node.

```
lncli --network=testnet connect 022ff54505fe9b50ce6c3c99c645c9aab67fe91abb01504c5211045b82a09aa757@103.102.44.207:9735

```

Error

```
[lncli] rpc error: code = Unknown desc = dial tcp 103.102.44.207:9735: connect: connection refused

```

**Tags:** lightning-network, lightning-network-daemon


---

## 1 answers

### Answer by username_1 on 2018-09-24. Score: 1 | Accepted answer

You need to connect to a node which has:

* RPC enabled
* username and password are known
* client IPs are whitelisted using `rpcallowip`
* the router has its port forwarding enabled.

Usually, public nodes don't share their RPC parameters, because that'd be very insecure. My advice is, run your own node. Otherwise, you could use the experimental [neutrino](https://github.com/lightninglabs/neutrino) client.

> **Comments:**
> **username_0**: I forgot to update my question with the answer, turns out the public node I tried to connect to was down, and the 2nd node I spun up was still syncing and therefor wasn't up. I tried more than a few on the list until I found one that worked. I'll mark yours as correct as those are valid steps.  

---

