Did anyone paranoid like me research security implications of running Tailscale/Headscale or similiar?

Right now I’m self-hosting headscale controller in my LAN and expose it to public Internet. I’m thinking about moving it to a VPS, but I’m a little paranoid about exposing the software that controls connectivity between my and family machines to a third party, be it official Tailscale controller or VPS provider where I run Headscale.

Currently I think that even in the worst case of someone compromising my Headscale instance it should still be fine as long as all of the machines are properly firewalled and all of the exposed apps and services are behind authentication. I run everything behind Authentik and only keys for SSH access. I will certainly add some network monitoring to all of that.

Any opions and suggestions on this matter are welcome.

  • tux7350@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 hour ago

    I use headscale on a VPS as an ingress point into my network and I love it. On top of headscale, I use two instances of traefik to make my network. I have one instance of traefik running on the vps which runs a couple of services that I want running 24/7(headscale-ui is nice). It pulls a subdomain certificate for TLS. So any services under say *.vps.example.com get routed to the VPS.

    Then I have a wildcard TCP rule pointing the rest of the network traffic to my home server through headscale. My home server is running another instance of traefik where all my services are running. This pulls another wildcard cert for the rest of the *.example.com subdomains.

    Cool thing about this setup is I can now have my DNS server rewrite *.example.com to my servers LAN IP. Now when my device is home, it works even when WAN is out. But when I’m out and about, it hits the public DNS and goes through my VPS. With traefik I can write a not !ClientIP rule and essentially block the VPS. Now I can host a service at home but also block it from being accessed from the public. But if I need access to the LAN remotely, I can just use a tailsacale client and get into headscale and see everything.

    Its an odd network, but it’s super flexible and works very well for my use case. If you have any questions I’d love to help you set something like this up :D

  • xinayder@infosec.pub
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 hours ago

    I had the same considerations when I self-hosted headscale as the controller for accessing my VPS. However, I figured that it shouldn’t be a big deal, and there’s no chance of someone registering rogue devices on your mesh, because, even though any device can request enrollment to Tailscale, ultimately you need to execute a command in your headscale server to confirm the enrollment/account creation, so there shouldn’t be that much of a problem leaving the web server exposed.

  • GetAwayWithThis@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 hours ago

    I had the same dilemma. It comes down to this in my opinion:

    • Do you trust yourself and your current networking gear, software, security setup enough to host this yourself at home?
    • Do you trust your vps providers tech stack, ethics, privacy policy etc. AND your own ability to secure it to host it on a vps?
    • Do you trust Tailscale the company who’s in the business of “zero trust vpn” solutions to use their product?

    I didn’t check if they were audited and if so how, but I went with the free Tailscale option, the most comfortable option for me now. Might change once I get more competent at the subject.

  • DoPeopleLookHere@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 day ago

    So the general tailscale actually uses peer to peer wiregaurd connections. Headscale is the middle point to negotiate these wiregaurd connections.

    So none of the traffic moves through the VPS.

    As for a VPS itself, it’s noore unsafe than your local bare metal. It’s still an application publicly exposed and needs basic precautions like fail2ban or crowdsec

  • Nick@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 day ago

    Headscale running as it’s own user with tailscale ACLs. Tailscale calls home to headscale via HTTPS and gets the info. Assuming the person doesn’t get root access it’s should be fairly safe. With tailscale ACLs you set up whicu systems can reach where. Also don’t forgot you can use UFW/iptables in each client that way it’s still locked down.

  • BCsven@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 day ago

    I can’t offer technical network advice on vps headscale; Personally I’m not confident in my network skills. I would be more inclined to go through the pain of manually setting up wireguard instead of having a tailscale or headscale service-- and skipping the middleman so to speak.

    Edit: setting up a new system this month, Tumbleweed has moved to SE Linux Enforcing as default. It provided some ssh and samba challenges at first until I learned about setting SEL policies. So maybe hardening with SE Linux would also be smart. For example I could SSH remotely into my machine but due to policies being locked down I could not run user bash, or even see contents of the home folder.

    • McMonster@programming.devOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      Thanks. Plain Wireguard is an option I’m considering, but it’s also considerably more hassle to configure and maintain, especially as I connect more family members to my network. Headscale also has an extra layer of security in the form of ACLs, which I plan to use on top of basic firewall configuration. I do connect my personal machines with Wireguard, but I use one family member as a Tailscale/Headscale test subject.

      As for SELinux, I’ve gave up on it already. It caused me so much headache over the years I disable it with a kernel parameter by default on all machines.

  • Lemmchen@feddit.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    I always wondered the same about ZeroTier. If the controller is under foreign control, isn’t the whole network compromised?

    • festus@lemmy.ca
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 day ago

      Yes but there are ways to protect against that. For instance you can configure Tailscale clients to only trust nodes that have been signed by trusted nodes, or something like that.