-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ipfs daemon lists many ports for its address #3780
Comments
This is again listing temporary ports issue. cc @whyrusleeping |
We really need to filter out ephemeral ports... at least on linux, anything on linux should be considered undialable unless we are explicitly listening on it |
https://en.wikipedia.org/wiki/Ephemeral_port If someone wants to tackle this that would be great. I won't be able to get to it until maybe later this week. It should be fairly simple, Just have to add checks into |
Is ipfs port fixed? Because one can in theory bind the port into that range. So blindly filtering them out might not be the best. |
@mitar We wouldnt be blindly filtering them out. The Ephemeral port metric for observed addresses is a good one i think, If someone we're connected to says the address they see us connecting from is in the ephemeral range, we shouldnt use that port as something we advertise we're listening on. If however, we do happen to be listening on that by manually specifying the port, we will announce the address anyways (We announce listenAddrs + observedAddrs to the network) |
We might want to wait for multiple confirmations or the same outgoing port. |
I am not familiar with Ephemeral port but with a little guidance I might be able to do this. @whyrusleeping let me know if this will be helpful. |
@Kubuxu that is with two confirmations of the same port. The problem is we only have about 32,000 ports, and over the course of a week, we're definitely going to overlap on some of those. Just by making around 250 outbound dials, we have a 50% chance of overlapping on an ephemeral port. At 500 outbound dials, we have a nearly 100% chance of an overlap. Given thousands of outbound dials over the course of a day, we end up with something like what @mitar posted in the issue. |
Lets definitely try and get this fixed in 0.4.9, it will help a lot with resource consumption and connectivity |
@Kubuxu are those changes you made merged in? |
It is in go-libp2p, they weren't propagated. |
@Kubuxu how about now? |
It should be good now. Closing, please open a new issue if it happens again. |
Version information:
Type: Bug
Priority: P3
Description:
I am running IPFS inside a Docker container. I mapped
xxx:4002->4002/udp
andxxx:4001->4001/tcp
ports to the outside IP. But when I useid
API to get addresses of those IPFS daemons, I get a long list of ports, which are not really mapped from outside.Like:
You can maybe see yourself what is being reported:
The text was updated successfully, but these errors were encountered: