lnd: Can't connect to my node remotely
My lnd is running on a Linux machine which has both 9735 and 10009 ports opened (also properly forwarded on the router).
I’m trying to use the latest Zap (built from the source) on Mac and LND Thin Wallet on iOS to connect to my node remotely but I always get “No Lightning Node available at the provided address” message. I don’t see anything related in lnd.log though.
I was able to connect to the node with Zap around 3 months ago then it stopped working.
I have no problem using lncli
locally, though.
I see the port is listening for remote connection and sudo netstat -nap | grep 10009
shows the following:
tcp6 0 0 :::10009 :::* LISTEN 27689/lnd
tcp6 0 0 192.168.1.106:10009 178.41.84.181:24221 ESTABLISHED 27689/lnd
My lnd.conf looks like this:
debuglevel=info
debughtlc=true
listen=0.0.0.0:9735
externalip=lnd.freedomnode.com
rpclisten=0.0.0.0:10009
alias=freedomnode.com
color=#ffdc00
maxpendingchannels=10
bitcoin.mainnet=1
bitcoin.active=1
bitcoin.node=bitcoind
bitcoind.rpcuser=<user>
bitcoind.rpcpass=<pass>
bitcoind.zmqpath=tcp://127.0.0.1:18501
lnd.freedomnode.com points to my public dynamic IP address which is updated regularly whenever the IP changes.
I suppose the problem is with my node, not the clients as they both behave in the same way.
Your environment
- lnd 26636ce
- Linux hackingmachine 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
- bitcoind 0.16 (latest binaries)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (7 by maintainers)
@Stadicus + @mariodian Thanks for reporting and guiding me to a fix!
Was having the same issue connecting from a remote client. I ended up using the tlsextraip config option to add my ip address, then removing tls.cert and tls.key from .lnd and restarting the client. This makes it generate the proper certificates.
Awesome, forgot to copy the latest
admin.macaroon
from the server to the client (after deletingtls.cert
+tls.key
and letting lnd regenerate the files). It works now 👍@LightningK0ala found it. While connecting with RPC, had to remove http:// or https:// from the hostname.
See
lnd -h
for the tls related options. I’d ask the Shango wallet author to possibly improve their set up options.Yes, that would be super helpful. Also regarding how to connect with Shango mobile wallet (@neogeno).
Yes sorry for not making that clear.
Is there any tut on how to properly create the certificate?
@mariodian we just added the ability for lnd to detect dynamically changing IPs, that sounds like it is your issue. Here is the PR https://github.com/lightningnetwork/lnd/pull/1109
We currently support UPnP and NAT-PMP, if your router is compatible with either then this may help. Try adding
nat=1
to your conf?