juanfont / headscale

An open source, self-hosted implementation of the Tailscale control server
BSD 3-Clause "New" or "Revised" License
22.6k stars 1.25k forks source link

[Bug] Can't always connect to Heascale through data (lte/4g) without passing via wifi first #1962

Closed Mark3xtrm closed 3 weeks ago

Mark3xtrm commented 4 months ago

Is this a support request?

Is there an existing issue for this?

Current Behavior

Probably it's me and I can't figure out how Headscale (btw nice piece of sw) works but this is what happens and idk if it's normal:

  1. I connect to the home wifi (in which my Headscale is active and operative) with my phone (Android or iOS)
  2. My Headscale paired device log in the Headscale network
  3. I turn off the wifi, then I enable the data: I remain connected to the Headscale network and I can use data instead of wifi to remotely access my home network services
  4. BUT if I turn off the connection in the Tailscale app (or I reboot the phone*), and turn it on again (all of this while using only data), I cannot reconnect to my Headscale network using only the data connection
  5. Then I have to reconnect to the home wifi to be able again to connect to the Headscale network. As you know right, this is impossible while I'm away

*(I'm not sure if this it's always the case when rebooting the phone)

Currently, these are my nodes immagine

And these are my routes immagine

Idk if this too is normal but: when I paired my devices, none of them automatically appaired in the routes list, and I had to add them with the advertise command. I did this with my Linux PC (srv) and my Android phone (rn7-mrk) with the "Run as exit node" on this one. Off course I can't do this on iOS as the Tailscale doc says. Idk if I have to at least advertise all nodes in the Headscale net to make it function properly and to avoid the problem above

Expected Behavior

I expect to be able to connect to the Headscale mesh network even using only the data connection, even after a disconnection from it through the toggle in the Tailscale app

Steps To Reproduce

  1. Connect to the Headscale mesh network using wifi (you have to already be paired to it)
  2. Disable wifi and use data connection
  3. Disconnect from the Headscale network (toggle of in the Tailscale app, or reboot the phone)
  4. Reconnect to the Headscale network using only the data connection
  5. You can't reconnect to it

Environment

- OS: Debian GNU/Linux trixie x86_64 (Headscale server)
- Headscale version: 0.23.0-alpha12
- Tailscale version: 1.66.3 on Android/iOS, 1.66.4 on Linux PCs

Runtime environment

Anything else?

No response

kradalby commented 4 months ago

did you have this issues with the prior stable version (0.22.3)?

timmyb824 commented 3 months ago

Just wanted to mention that I recently began configuring headscale as a transition from tailscale. I experimented with this specific situation using my iPhone and encountered the same problem. It didn't connect over cellular, so I had to turn on wifi again for it to connect. Once connected, I can turn off wifi and it seems to work fine over cellular. I'm running headscale (v0.22.3) in a Proxmox LXC. iPhone Tailscale client version is 1.66.3.

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 3 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

Egleyser commented 1 week ago

Hi guys, I implemented the latest headscale with the latest client for iOS on an iPhone and iPad and the same thing happened on both. As mentioned by @timmyb824 enabling the VPN while on wifi and then turning it off makes the device connect to the advertised nodes and subnets.