Coder Social home page Coder Social logo

Cannot connect to LND via Tor about bitbanana HOT 7 CLOSED

djesys avatar djesys commented on July 18, 2024
Cannot connect to LND via Tor

from bitbanana.

Comments (7)

michaelWuensch avatar michaelWuensch commented on July 18, 2024

Hi,
first of all, Orbot is not needed, BitBanana suports tor natively.
The problem is most likely that you are trying to connect on port 9735 which is the port for the lightning peer 2 peer protocol. But what you want to connect to is the api that lnd exposes which is on 10009 for gRPC.
Therefore, in BitBanana go to manage nodes and edit the connection settings and change the port to 10009 and save.

from bitbanana.

djesys avatar djesys commented on July 18, 2024

from bitbanana.

djesys avatar djesys commented on July 18, 2024

from bitbanana.

michaelWuensch avatar michaelWuensch commented on July 18, 2024

Hi,
when connecting over tor, the certificate isn't even needed. Tor already ensures you are connected with the correct service. Therefore when connecting over Tor BitBanana does not even check the cert.
What is needed though is the admin macaroon (macaroon = fancy cookie), which defines what access the API user has. Admin macaroon grants access to everything.
So in your lndconnect command you have to add the admin macaroon path.

from bitbanana.

djesys avatar djesys commented on July 18, 2024

Hi, so I added this to
/etc/tor/torrc

HiddenServiceDir /var/lib/tor/lnd
HiddenServicePort 10009 127.0.0.1:10009

and used this string to create an lndconnect string:

lndconnect --adminmacaroonpath=/home/user/.lnd/data/chain/bitcoin/mainnet/admin.macaroon --port=10009 --host=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion -j

The result I pasted into bitbanana. Response continues

Connection failed.

UNAVAILABLE: Response
returned from proxy was not
successful (expected 2xx, got
502 Bad Gateway (unexpected
close)). Response body:

nmap:
9050/tcp open tor-socks
9051/tcp open tor-control
9735/tcp open unknown
10009/tcp open swdtp-sv

curl --socks5 localhost:9050 --socks5-hostname localhost:9050 -s https://check.torproject.org/ | cat | grep -m 1 Congratulations | xargs
Congratulations. This browser is configured to use Tor.

Firewall 10009 is open, even though propably not necessary.

I am out of ideas now.

from bitbanana.

michaelWuensch avatar michaelWuensch commented on July 18, 2024

Hm, me too.
I myself actually use preconfigured setups like Start9 or Umbrel instead of setting up everything on my own. Therefore I don't have to much experience with it. What I can see from your posts looks correct.
In general Tor connection is not very reliable. Connecting to my nodes with tor often works, then sometimes it doesn't for a few hours or so without me changing anything. I cannot remember though if that error message you get was one of the temporary failures.
I personally switched to using Tailscale VPN to connect to my nodes. The user experience is so much better as it is way faster and much more reliable. But of course not as private.

I guess it is still the same with ZEUS?
(For ZEUS you need to use port 8080 as ZEUS only supports REST, not gRPC)

from bitbanana.

djesys avatar djesys commented on July 18, 2024

I can confirm connecting to clearnet IP works. So, it´s something Tor-related. I will give tailscale a shot, just hoping the setup is straight forward.

from bitbanana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.