[Bug] After upgrading to 0.27 pfSense cannot keep the login state when rebooting or restarting the Tailscale service #1142

Closed
opened 2025-12-29 02:28:31 +01:00 by adam · 2 comments
Owner

Originally created by @achtnullzwei on GitHub (Nov 11, 2025).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Upgraded from 0.26.1 to 0.27 today. After the upgrade I noticed some strange behaviour from nodes that use preauthkeys. The biggest problem though was, that pfSense cannot keep the login state any longer after upgrading. If I reboot the firewall or restart the Tailscale service on it, Tailscale gets logged out with either "cannot reuse preauthkey" or "preauthkey expired", dending on how long I gave it until testing. I tested this restarting the service directly after logging out and in with a newly created key and also tried to wait for 2h then restarted the service.

I am not sure what is causing this. However I do not want to create reusable and non-expiring keys. This has not been a problem until 0.27

Reverted back to 0.26.1 and its working fine, but that's not really a long term solution.

Thx in advance.

Expected Behavior

I can reboot the firewall or restart Tailscale service on pfSense and I will login again without issues. This has been the behaviour up until 0.26.1 and I had zero issues so far.

Steps To Reproduce

  1. Setup Tailscale on pfSense or logout and clean credentials/state (button in the UI)
  2. Create a new preauthkey on 0.27
  3. login on pfSense Tailscale client
  4. click the button to restart the Tailscale service or reboot firewall
  5. Tailscale does not log back in. Instead gives error on reusing the key or key expired, depending on time passed since creating the key

Environment

- OS:pfSense Plus 25.07.1-RELEASE (FreeBSD 15.0-CURRENT)
- Headscale version: 0.27.0
- Tailscale version: 1.82.5 (latest in pfSense)

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

pfSense GUI doesn't allow much debugging. Just got the error messages that either key was reused or key expired.

It took me a while to revert back to 0.26.1 and I didn't enable any debugging on 0.27 before reverting back. If I find time I can turn on debugging and try it again, but it might take some time.

Originally created by @achtnullzwei on GitHub (Nov 11, 2025). ### Is this a support request? - [x] This is not a support request ### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior Upgraded from 0.26.1 to 0.27 today. After the upgrade I noticed some strange behaviour from nodes that use preauthkeys. The biggest problem though was, that pfSense cannot keep the login state any longer after upgrading. If I reboot the firewall or restart the Tailscale service on it, Tailscale gets logged out with either "cannot reuse preauthkey" or "preauthkey expired", dending on how long I gave it until testing. I tested this restarting the service directly after logging out and in with a newly created key and also tried to wait for 2h then restarted the service. I am not sure what is causing this. However I do not want to create reusable and non-expiring keys. This has not been a problem until 0.27 Reverted back to 0.26.1 and its working fine, but that's not really a long term solution. Thx in advance. ### Expected Behavior I can reboot the firewall or restart Tailscale service on pfSense and I will login again without issues. This has been the behaviour up until 0.26.1 and I had zero issues so far. ### Steps To Reproduce 1. Setup Tailscale on pfSense or logout and clean credentials/state (button in the UI) 2. Create a new preauthkey on 0.27 3. login on pfSense Tailscale client 4. click the button to restart the Tailscale service or reboot firewall 5. Tailscale does not log back in. Instead gives error on reusing the key or key expired, depending on time passed since creating the key ### Environment ```markdown - OS:pfSense Plus 25.07.1-RELEASE (FreeBSD 15.0-CURRENT) - Headscale version: 0.27.0 - Tailscale version: 1.82.5 (latest in pfSense) ``` ### Runtime environment - [x] Headscale is behind a (reverse) proxy - [x] Headscale runs in a container ### Debug information pfSense GUI doesn't allow much debugging. Just got the error messages that either key was reused or key expired. It took me a while to revert back to 0.26.1 and I didn't enable any debugging on 0.27 before reverting back. If I find time I can turn on debugging and try it again, but it might take some time.
adam added the bug label 2025-12-29 02:28:31 +01:00
adam closed this issue 2025-12-29 02:28:31 +01:00
Author
Owner

@nblock commented on GitHub (Nov 11, 2025):

pfSense probably unconditionally submits the preauthkey (similar do tailscale in a container), fixed in main. Will be part of 0.27.1. See #2830

@nblock commented on GitHub (Nov 11, 2025): pfSense probably unconditionally submits the preauthkey (similar do tailscale in a container), fixed in main. Will be part of 0.27.1. See #2830
Author
Owner

@achtnullzwei commented on GitHub (Nov 11, 2025):

@nblock oh sorry this one slipped through when I skimmed the issues for existing occurrences of this. Thx a lot! Looking forward to 0.27.1

@achtnullzwei commented on GitHub (Nov 11, 2025): @nblock oh sorry this one slipped through when I skimmed the issues for existing occurrences of this. Thx a lot! Looking forward to 0.27.1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1142