I need to restart tailscale service after pfsense reboot
-
For some odd reason, even though the service seems UP, and routes (apparently from tailscale) looks fine, the service itself is not working.
E.g. I cannot connect to other hosts on my tailscale network. From pfsense itself it works, but not from my e.g. my LAN.
As soon as I restart the tailscale service in the UI it works immediately after.
-
@lbm_ I have the same problem: pfSense v25.07.1 on FreeBSD 15-Current, Netgate 6100. Could you let me know if you found a solution? I haven't. I have been updating Tailscales from Freshports while keeping the Tailscale Package installed. I have recently read that this can cause problems with routes, interfaces, firewall rules, and others. I am leaning towards deleting the Tailscale package.
-
I found a solution that requires replacing the /usr/local/etc/rc.d/tailscaled script with the script below. It worked for me after having done a fresh reinstall of the Tailscale Package and the Freshports FreeBSD15 tailscale update 1.90.6_1.
#!/bin/sh
Tailscale service script for pfSense (works with manually updated binaries)
. /etc/rc.subr
name="tailscaled"
rcvar="tailscaled_enable"
pidfile="/var/run/${name}.pid"
command="/usr/local/bin/tailscaled"0.6_
start_cmd="${name}_start"
stop_cmd="${name}_stop"tailscaled_start()
{
echo "Starting Tailscale..."
if checkyesno tailscaled_enable; then
${command} --cleanup
${command} --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock &sleep 2 /usr/local/bin/tailscale up $(/usr/local/bin/tailscale status --json | jq -r '.BackendState // "NoState" | select(. == "NoState")') && /usr/local/bin/tailscale up || true fi}
tailscaled_stop()
{
echo "Stopping Tailscale..."
${command} --cleanup
killall tailscaled 2>/dev/null
}load_rc_config $name
run_rc_command "$1" -
After saving the script:
chmod +x /usr/local/etc/rc.d/tailscaled
sysrc tailscaled_enable=YES
service tailscaled restart