-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Nat traversal port selection #383
Comments
I believe the issue here is that the node is running on freebsd, which doesn't support reuseport. Therefore, it's using random ports when dialing. Unfortunately, that means that we're advertising these random ports. But yeah, we should do as @whyrusleeping says: figure out which external addresses are reasonable and ask some node to try dialing them. Unfortunately, the current libp2p construction makes this a bit tricky (connection deduplication). |
NATs may also be messing with these ports. |
related to #383 I won't call this *fixed* yet but it should help.
So, my attempted fix was wrong. We already expose the addresses on There are two issues here:
|
This should (partially) be solved by AutoNAT, and more elegantly by AutoNAT v2. |
I have an ipfs node that is behind a NAT, but I have port forwarding set up.
Despite this, my peer does not advertise any reachable address (it doesn't know about the port forwarding).
I could manually add the right address to my advertised addresses, but forcing users to do that is kindof obnoxious UX.
We should probably have nodes discover their gateways, attach their listen ports to it, and then ask some nat service to try dialing us through it. If that succeeds, then we should add it to our list of known good addresses.
The text was updated successfully, but these errors were encountered: