Skip to content
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

Private reachability for Public node #3087

Open
b00f opened this issue Dec 6, 2024 · 7 comments
Open

Private reachability for Public node #3087

b00f opened this issue Dec 6, 2024 · 7 comments

Comments

@b00f
Copy link

b00f commented Dec 6, 2024

Reachability is not consistent information, and for some unknown reason, some public nodes with public IPs are shown as private [Example here].
Any idea why this happens? Probably, this may have some effects on other modules, which I believe should be taken care of.

@sukunrt
Copy link
Member

sukunrt commented Dec 6, 2024

The node may be behind a firewall. Is it possible to enable prometheus metrics?
https://github.com/libp2p/go-libp2p/tree/master/dashboards

@b00f
Copy link
Author

b00f commented Dec 6, 2024

The node may be behind a firewall.

Yes, we do have a firewall for security reasons, but we have enabled all the ports we are aware of.
Is there any specific port for this purpose that is not configurable by users?

Is it possible to enable Prometheus metrics?

Sure, I just enabled it, and I believe this is what you're looking for: Prometheus Metrics.

@sukunrt
Copy link
Member

sukunrt commented Dec 8, 2024

You need to open the port that the node is listening on. From the metrics, I see a lot of your requested dailbacks errored. I also see that in the last few hours, the node has not made any dial back requests, which is very strange because I see some peers in swarm. Maybe none of them support autonat protocol?
For further debugging you can enable autonat logs and see if there's anything suspicious there. That would be env GOLOG_LOG_LEVEL="autonat=debug"

If you're confident that the node is private, you can use https://github.com/libp2p/go-libp2p/blob/master/options.go#L349 ForceReachabilityPublic option.

@b00f
Copy link
Author

b00f commented Dec 8, 2024

Thanks for time to check and identify the issue.

Please consider these is not a test network and we can't easily make any changes for debugged purpose.
We update the nodes on official release. We try to add some logs to get more information in the next release.

@b00f
Copy link
Author

b00f commented Dec 8, 2024

You need to open the port that the node is listening on.

Which port?

@b00f
Copy link
Author

b00f commented Dec 8, 2024

Maybe none of them support autonat protocol?

Probably we have at least 6 (The nodes we have configured)

@2color
Copy link
Contributor

2color commented Dec 17, 2024

You need to open the port that the node is listening on.

Which port?

The port is determined based on how you configure the libp2p host.

For example, this is how you listen on port 9000

libp2p.ListenAddrStrings(
"/ip4/0.0.0.0/tcp/9000", // regular tcp connections
"/ip4/0.0.0.0/udp/9000/quic-v1", // a UDP endpoint for the QUIC transport
),

@2color 2color changed the title Privare reachability for Public node Private reachability for Public node Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants