Skip to content

Add ipfs stats network command to tell you if your node is publicly reachable #11171

@2color

Description

@2color

Checklist

  • My issue is specific & actionable.
  • I am not suggesting a protocol enhancement.
  • I have searched on the issue tracker for my issue.

Description

Problem

Users currently have no easy way to determine if their IPFS node is publicly reachable. Indeed, you can use the ipfs id to see your IP addresses, however, due to circuit relay multiaddrs and the many transports, it's not very user friendly. There are also situations when ipfs id returns a public IP that isn't in fact reachable.

Proposed Solution

Add ipfs stats network command that:

  1. Reports reachability status: public, private, or relayed (if you have circuit relay reservations.
  2. Shows the external IP address(es) and port(s) other peers can reach you on
  3. Uses AutoNAT for determining the output

Example Output

$ ipfs stats network

Public Reachability: public
External Addresses:
  - /ip4/203.0.113.42/tcp/4001/p2p/...
  - /ip6/2001:db8::1/tcp/4001/p2p/...

AutoNAT Status: public (confirmed by 3/5 peers)

Note: We could also return JSON

Where this might be useful

This can help a lot in the IPFS docs for debugging information and guides focused on publishing data where this matters for retrieval without NAT traversal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps uparea/networkeffort/hoursEstimated to take one or several hourskind/featureA new featuretopic/libp2pTopic libp2p

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions