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

Unable to connect via P2P even both public IPv6 are available #2606

Open
jjqtony opened this issue Sep 16, 2024 · 1 comment
Open

Unable to connect via P2P even both public IPv6 are available #2606

jjqtony opened this issue Sep 16, 2024 · 1 comment

Comments

@jjqtony
Copy link

jjqtony commented Sep 16, 2024

Describe the problem
I am pretty sure that both of my peers have public IPv6 address, however I fail to connect two peers via P2P.

Peer 1: ubunt Linux (with public IPv6)
Peer 2: Alpine linux (with public IPv6)

To Reproduce

Steps to reproduce the behavior:

Start Netbird service on two peers (both of them have public IPv6 address, their ping latency less than 40ms)
Run netbird status -d

Expected behavior

Status: Connected
-- detail --
Connection type: P2P
Direct: true

Are you using NetBird Cloud?

Yes

NetBird version

0.29.2

NetBird status -dA output:
netbird.cloud:
NetBird IP: 100.83.111.47
Status: Connected
-- detail --
Connection type: Relayed
ICE candidate (Local/Remote): relay/prflx
ICE candidate endpoints (Local/Remote): 198.51.100.0:46600/198.51.100.1:32751

@jclds139
Copy link
Contributor

jclds139 commented Dec 12, 2024

I'm running into the problem right now as well. I think (not absolutely certain), that it's related to client/internal/peer/worker_ice.go@153.
When I run the client manually, I get error in the form of
2024-12-12T16:59:14-05:00 WARN [peer: *****************=] client/internal/peer/worker_ice.go:269: got an error while resolving the udp address, err: address ****:****:****:****:****:****:****:****:51820: too many colons in address. which is triggering from line 267 which resolves the addresses. The go docs say If the host is a literal IPv6 address it must be enclosed in square brackets, as in "[2001:db8::1]:80" or "[fe80::1%zone]:80" (https://pkg.go.dev/net#Dial), so I'm guessing that up at line 153 there needs to be a check for IPv6 addresses so that the string is formatted correctly when loaded from the ice CandidatePair.

If so, that means this issue and #2327 are related.

jclds139 added a commit to jclds139/netbird that referenced this issue Dec 13, 2024
Fixes netbirdio#2327 and netbirdio#2606 by formatting all addresses from ICE as IPv6
(since IPv4 addresses can be parsed and formatted the same way).
jclds139 added a commit to jclds139/netbird that referenced this issue Dec 13, 2024
Should fix netbirdio#2327 and netbirdio#2606 by checking for IPv6 addresses from ICE
mlsmaycon pushed a commit that referenced this issue Dec 16, 2024
Should fix #2327 and #2606 by checking for IPv6 addresses from ICE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants