20
submitted 2 weeks ago* (last edited 2 weeks ago) by Infernal_pizza@lemm.ee to c/linux@lemmy.ml

I've had a VPN running on my server via Wireguard for ages with no issues. A couple of weeks ago I finally got round to setting up Tailscale so I could access it remotely and again it worked fine without any issues. I rebooted my server this morning and while I was out I realised I could no longer access it, once I got home I discovered everything else was working fine it was just inaccessible over Tailscale.

After some troubleshooting I've come to the conclusion that if Tailscale starts first the other VPN's routing entries take priority and Tailscale doesn't work. If Tailscale starts second then it seems to work fine. As far as I can tell I have a few options for fixing this but I'm not sure what would be the most recommended. The simplest solution is probably just to disable Tailscale from autostarting and start it manually, however I'm likely to forget that at some point and will probably only notice when I'm out and can't access the server to start it.

If I add the following to the Wireguard config file this solves the issue: PostUp = ip route add 100.64.0.0/10 dev tailscale0
PostDown = ip route del 100.64.0.0/10 dev tailscale0 However in that case if the other VPN tries to start first it just fails as the tailscale0 interface doesn't exist yet, so all I've done is reverse the order I need them to start.

I could also edit the wireguard or tailscale service files with before or after targets, that would be fairly simple to do but I think its not recommended to manually edit package provided service files? The tailscale one specifically says its meant to be read only.

The final option I can think of is to disable the tailscale service on startup and then create a systemd timer to start the tailscale service with a slight delay after boot. I think this may be the best method as I can't see any downsides, but maybe I'm overlooking something?

you are viewing a single comment's thread
view the rest of the comments
[-] melmi@lemmy.blahaj.zone 10 points 2 weeks ago

Editing the systemd services seems a neat solution here. Rather than editing the package-provided service files directly, you can create overrides using systemctl edit.

Another more hacky option would be to use the PostUp directive but account for the case there's no tailscale0 device yet. Write a simple shell script or something.

[-] Infernal_pizza@lemm.ee 1 points 2 weeks ago

Thanks, I didn't know systemctl edit was a thing!

this post was submitted on 02 May 2025
20 points (100.0% liked)

Linux

54300 readers
320 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS