-
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
UDP QUIC Hole Punching Fails due to Port Reuse #3165
Comments
Thank you for taking the time to file this and include nice diagrams. A couple of questions:
|
Peer A:
Peer B:
Unfortunately it does not appear so
A few reasons:
Yes each Peer in this case gets scheduled to a Kubernetes Node (EC2 instance) that is a part of the cluster.
No but some peers in the cluster might be scheduled behind the same NAT as the NAT is per-EC2 instance which many peers could be scheduled onto.
I did confirm that the hole punching logic is called based on the logging
Added, it should be noted that I have a filter function which forwards only the addresses that will work for hole punching. I've added the relevant logs below Peer A:
Peer B:
|
We're leveraging LibP2Ps hole punching functionality to mesh together several private networks. The network layout looks something like this
We have multiple apps running in Kubernetes clusters, each cluster has:
Below visualizes how this looks in actuality
The connection flow looks something like below:
The problem we're experiencing is that during the hole punch from A1 to A2 we require the HolePunch to happen over a set range of ports since 443 does not work for hole punching.
We've ensured that LibP2P is listening on these ports and added a filter function to ensure that both peers agree on the same port range (40000-40050) however when observing the traffic leaving both peer pods it originates from port
443
.This means that the hole punch fails since both peers outbound ports do not match their expected inbound port.
We were able to resolve the bug by removing this particular line
go-libp2p/p2p/transport/webtransport/transport.go
Line 210 in 0fde4dc
@MarcoPolo mentioned in this issue it's worth filing a proper bug for to track as this PR seems to be the root cause
#2936
Version Information
The text was updated successfully, but these errors were encountered: