-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior when trying to connect to bootstrap nodes #245
Comments
Seems you are announcing 0.0.0.0 addresses with the |
And you are also only listening on localhost. That's definitely not what you want. |
-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? |
Sorry, my bad -- you are right. I haven't touched this code in a while and I forget what all the options do :) |
Your addrs options are perfectly fine, sorry for my misleading comments. |
ok, so your bootstrappers are using tcp and you are listening on quic; I wonder whether this is a problem in this case. |
which shouldn't be because it is also using the default transports. |
I describe task detailed. We have node with public IP (node A):
and node under NAT (node B) with bootstrapping to node A:
Peer addrs list contains only LAN addresses. But if connect to global IPFS network node B has "behind NAT" IP:
How to run node A (public IP machine) so that node B gets its "behind NAT" ? |
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. |
Thanks for your help! |
The ForceReachability option actually did not solve our problem as running only one bootstrap doesn't return the public IP |
We want to set up our custom network so that machines under NAT can still connect to each other. We tried providing our bootstrap nodes, but they didn't return the public address of our under-NAT machines.
Then we tried providing nodes from this go-libp2p example and encountered some strange behavior: when providing only one of the peers nothing works (either we can't connect, or the peer doesn't return the public IP), but when providing both everything works just fine.
What could be the issue? Could the issue be with how we configure our nodes? If yes, what options do we need to specify, so the peers return the public addresses of other nodes?
The text was updated successfully, but these errors were encountered: