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 thread.
View all comments
10 points

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.

permalink
report
reply
1 point

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

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

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

Community stats

  • 7.5K

    Monthly active users

  • 5K

    Posts

  • 77K

    Comments