|
I have an extensive set of docker services behind an edge router (Traefik, but it was also Caddy in the past) and recently started to use Tailscale in addition to my own mesh Wireguard network (Tailscale does it better, faster, simpler and nicer so if it works my own contraption will at best be a backup) My web services are defined, DNS-wise, as a wildcard So far so good. I now discovered TSDproxy and tried to understand how it works. What I am missing is where the What am I missing? |
Replies: 2 comments 5 replies
|
I have exactly the same configuration (except I refer to it as "expedient" rather than "lazy" ;-). If you have Magic DNS enabled on Tailscale, it will take care of the FQDN for the Docker containers on your tailnet. You can specify the "CNAME" (e.g. sonarr) as a parameter to TSDproxy, or you can let it default to the Docker container name. The issue you reference is related to creating custom DNS names within your tailnet that resolve to specific servers, like "sonarr.test.xxxx-xxxx.ts.net" or "sonarr.dev.xxxx-xxx.ts.net. (unless I misunderstood your question) |
No, I mean that you have enabled Tailscale "Magic DNS" on the Tailscale DNS setting at https://login.tailscale.com/admin/dns
It works perfectly fine - I am using Traefik as my proxy/edge router. I have two sets of labels on each of my service containers: one for Traefik, and another for TSDproxy. The Traefik labels set up access by the FQDN at "MyDomain.com" (using local DNS with CNAMES in pi-hole), and the TSDproxy labels set up access to the associated "machines" on my Tailnet at service.xxxx-xxxx.ts.net. Two routes to get to the same service. ;-) In Tailscale, I use tags and ACL to both identify and control access to the services. And TSDproxy replaces the Tailscale "sidecars" that I used to use to achieve the same result. (or in some cases, the Tailscale Docker Mod for linuxserver.io containers) It's easier than you think! |
When TSDproxy adds the Docker container to your tailnet, Tailscale treats it as a "machine". Tailscale assigns it an IP address, and MagicDNS assigns it a FQDN on your tailnet (the "Magic" part). So, sonarr.xxxx-xxxx.ts.net is "assigned at birth" to the service , just like it was for the Docker host. Tailscale doesn't care where or what it is - everyone gets a name. So one Docker host can have many services running on it, where both the host and all of the services each have FQDNs on your tailnet. Magic!