Comment by aseipp

10 hours ago

Just yesterday I was complaining that I wanted to SSH back to my homenet while at the office, on my office (not home) tailnet. I wrote something based on Iroh to do this, but it's one shot (ie not particularly generalized). Might be able to throw it away or redesign it with some inspiration from this! Thanks.

I solved this problem by building/running a custom tailscale client that connects to two tailnets at the same time (https://github.com/maisem/tailmix)

  • I was just wondering yesterday if it'd be possible to have a tailscale client, or multiple tailscale clients in their own network namespaces, that could connect to multiple networks.

    The slightly tricky part would be managing a local NAT that blends the two networks, and also does MagicDNS to answer on those NATed IPs. If routes conflicted, I guess you'd have to pick one?

    Seems very doable though.

    • yeah that's kinda what it does. It sets up two tsnet servers connected to two different tailnets and exposes them through a shared TUN device. It does the magic of allocating safe IPs to each host so that they don't overlap and does some leasing so that IPs aren't accidentally reassigned. It also does the MagicDNS thing so that DNS returns the "effective IP".

      I wanted it to work on macOS so couldn't rely on network namespaces.

      1 reply →

you could try rayfish.xyz, it is compatible with tailscale nowadays so you can run both tailscale and rayfish