Git Product home page Git Product logo

Comments (11)

vyzo avatar vyzo commented on July 24, 2024 10

This is because there needs to be some confidence on the observations in autonat; you need to connect to enough peers to verify that (I think it's 3 or 4), so you can't get it from a single bootstrapper.

We could expose the ForceReachability option in go-libp2p, should be simple to implement if you care for a patch.

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

Seems you are announcing 0.0.0.0 addresses with the -hostAddrs option.

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

And you are also only listening on localhost. That's definitely not what you want.

from go-libp2p-daemon.

MaximKsh avatar MaximKsh commented on July 24, 2024

-listen address is using for connecting to daemon from binding, isn't it? It may be unix socket as well. Do we (with @deniskamazur ) misunderstand something? What is the proper way to start p2pd node with public IP and several nodes under NAT so that "under NAT" nodes acquire "behind NAT" IP and may connect to each other?

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

Sorry, my bad -- you are right. I haven't touched this code in a while and I forget what all the options do :)

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

Your addrs options are perfectly fine, sorry for my misleading comments.

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

ok, so your bootstrappers are using tcp and you are listening on quic; I wonder whether this is a problem in this case.

from go-libp2p-daemon.

vyzo avatar vyzo commented on July 24, 2024

which shouldn't be because it is also using the default transports.

from go-libp2p-daemon.

MaximKsh avatar MaximKsh commented on July 24, 2024

I describe task detailed. We have node with public IP (node A):

$ ./p2pd -tls=1 -connManager=1 -natPortMap=1 -autonat=1 -dhtServer=1   -hostAddrs=/ip4/0.0.0.0/tcp/5000
Control socket: /unix/tmp/p2pd.sock
Peer ID: QmUN5jQC26K3FM3XSjjPcKBWZAaxB9NiQBcL3XZPhaWvPX
Peer Addrs:
/ip4/92.53.78.235/tcp/5000
/ip4/127.0.0.1/tcp/5000

and node under NAT (node B) with bootstrapping to node A:

$ ./p2pd -tls=1 -connManager=1 -natPortMap=1 -autonat=1 -dhtClient=1 -b -bootstrapPeers=/ip4/92.53.78.235/tcp/5000/p2p/QmUN5jQC26K3FM3XSjjPcKBWZAaxB9NiQBcL3XZPhaWvPX -hostAddrs=/ip4/0.0.0.0/tcp/44002
Control socket: /unix/tmp/p2pd.sock
Peer ID: Qmdn5vaZ3tR81wfDVQ5m1Z4dWmKXUFwuhPNGvwf5FYM1CM
Peer Addrs:
/ip4/192.168.1.150/tcp/44002
/ip4/127.0.0.1/tcp/44002
Bootstrap peers:
/ip4/92.53.78.235/tcp/5000/p2p/QmUN5jQC26K3FM3XSjjPcKBWZAaxB9NiQBcL3XZPhaWvPX

Peer addrs list contains only LAN addresses. But if connect to global IPFS network node B has "behind NAT" IP:

$ ./p2pd -tls=1 -connManager=1 -natPortMap=1 -autonat=1 -dhtClient=1 -b -hostAddrs=/ip4/0.0.0.0/tcp/44002
Control socket: /unix/tmp/p2pd.sock
Peer ID: Qmdp341BhnUdZxxPU873qP6NtYT1DrdMGNixG9S41wJKfL
Peer Addrs:
/ip4/192.168.1.150/tcp/44002
/ip4/127.0.0.1/tcp/44002
/ip4/109.252.14.143/tcp/19973   <--- behind NAT IP. Why it shows only if connect to IPFS network?

How to run node A (public IP machine) so that node B gets its "behind NAT" ?

from go-libp2p-daemon.

dvmazur avatar dvmazur commented on July 24, 2024

Thanks for your help!

from go-libp2p-daemon.

dvmazur avatar dvmazur commented on July 24, 2024

The ForceReachability option actually did not solve our problem as running only one bootstrap doesn't return the public IP

from go-libp2p-daemon.

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.