3 ms·
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 t
by aseipp 1mo 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.
- bradfitz 1mo agoThere's an example in the README how to do exactly that :)
- codegladiator 1mo agowhy not try out some existing project already on top of iroh ? I see a bunch here on awesome-iroh page https://github.com/n0-computer/awesome-iroh https://github.com/n0-computer/awesome-iroh
- dfish 1mo agoyou could try rayfish.xyz, it is compatible with tailscale nowadays so you can run both tailscale and rayfish
- maisem 1mo agoI solved this problem by building/running a custom tailscale client that connects to two tailnets at the same time (https://github.com/maisem/tailmix https://github.com/maisem/tailmix)
- linsomniac 1mo agoI 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.
- linsomniac 1mo ago@bradfitz: Steal this idea ^^^ ;-)
- maisem 1mo agoyeah 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.
- linsomniac 1mo agoThat deserves it's own top-level discussion, for sure! https://news.ycombinator.com/item?id=49457539 https://news.ycombinator.com/item?id=49457539
- preisschild 1mo agoyou might be able to do it via iroh's dumbpipe