netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
11.1k stars 511 forks source link

ios app can't connect when use mobile network #1453

Open NatureLR opened 10 months ago

NatureLR commented 10 months ago

Describe the problem

ios app can't connect when use mobile network

截屏 2024-01-10 16 11 15 Snipaste_2024-01-10_16-10-02

oldwang12 commented 10 months ago

I had the same problem on my iphone, fuck iphone.

surik commented 10 months ago

Hi @NatureLR and @oldwang12, this is some limitation we already identified. We will be working on solving this soon.

surik commented 10 months ago

Also, as I see this is self-hosted. Can you confirm that your relay service is configured properly?

To test your TURN configuration by accessing the link https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/. There you will find an ICE servers input box, where you can select and remove the existing server, then add your turn server configuration as follows:

Please replace netbird.DOMAIN.com and PASSWORD with the information from the management.json TURNConfig, then click on Add server.

Run the candidate gathering by clicking on Gather Candidates.

NatureLR commented 10 months ago

Also, as I see this is self-hosted. Can you confirm that your relay service is configured properly?

To test your TURN configuration by accessing the link https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/. There you will find an ICE servers input box, where you can select and remove the existing server, then add your turn server configuration as follows:

Please replace netbird.DOMAIN.com and PASSWORD with the information from the management.json TURNConfig, then click on Add server.

Run the candidate gathering by clicking on Gather Candidates.

yes,i use getting-started-with-zitadel.sh deploy my server

Snipaste_2024-01-11_10-42-55

Ben7on commented 10 months ago

I believe I had the same issue. After some support from the team on slack, I was able to resolve it.

You need to add the public ip of your server in the turn configuration file as follow:

externalip=193.224.22.37

As seen in your screenshot, your turn server currently advertise an internal ip:

Screenshot 2024-01-11 at 14 45 27

NatureLR commented 10 months ago

I believe I had the same issue. After some support from the team on slack, I was able to resolve it.

You need to add the public ip of your server in the turn configuration file as follow:

externalip=193.224.22.37

As seen in your screenshot, your turn server currently advertise an internal ip:

Screenshot 2024-01-11 at 14 45 27

oh Successful !!! 😄

i add external-ip=<eip> to turnserver.conf and use

docker compose up -d --force-recreate coturn
jiangslee commented 10 months ago

I believe I had the same issue. After some support from the team on slack, I was able to resolve it. You need to add the public ip of your server in the turn configuration file as follow: externalip=193.224.22.37 As seen in your screenshot, your turn server currently advertise an internal ip: Screenshot 2024-01-11 at 14 45 27

oh Successful !!! 😄

i add external-ip=<eip> to turnserver.conf and use

docker compose up -d --force-recreate coturn

It works for me too!!!

collse commented 2 months ago

unfortunately this solution only works with fixed ip addresses and not with dynamic IPs

SvenSapphire commented 2 months ago

Unfortunately this doesn't work for me. I double checked the TURN configuration and the test indicated the correct IP-Address. This behavior only appears on cellular connection. I can exclude the DNS and Network-Route functionality because turning them off will not resolve the issue.

Now the interesting part: If I connect my Mac with mobile hotspot to the iPhone, the Mac can connect to the peers without any problem. So I guess the problem is in the iOS app itself.