Tinc, a GPLv2 mesh routing VPN
tinc-vpn.org
tinc-vpn.org
You even get a 'dot' graph of your current network status if you want to. When 'git' was invented, I put my /etc/tinc/*/ into git with the public keys, and installing a new host to the mesh is one 'git clone' away.
Most underrated open source software ever.
Today I use a hub-and-spoke design with wireguard to achieve this, because I never know where these devices will be so I can't guarantee that I can forward ports to them through a firewall.
Does tinc solve that port forwarding problem? I've read the intro in the manual but it only says tinc is a regular VPN.
From the features list: “Regardless of how you set up the tinc daemons to connect to each other, VPN traffic is always (if possible) sent directly to the destination, without going through intermediate hops.” and “As long as one node in the VPN allows incoming connections on a public IP address (even if it is a dynamic IP address), tinc will be able to do NAT traversal, allowing direct communication between peers.”
So yes, it gets around that problem if you have at least one publicly connectable node. How it does this if that node doesn't have a fixed address I've not looked into. Also there are no doubt NAT arrangements that it can't punch through meaning it'll have to fall-back to something akin to your hub model with nodes affected by such NAT talking to each other through another node.
Yes. I use it in production for that exact purpose. It only requires that one node is reachable via public IP address.
An advantage that tinc has over wireguard is that it can do local discovery and direct communication if your devices happen to be in the same local network.
The VPS is still used as a central discovery location, but remote devices can learn about each other and talk directly to eachother.
I feel like the perennial posts about lisp pretty handily demonstrate this to be false.
Also a Todo list web app.
I now mostly use Wireguard, but mainly of the Linux kernel driver.
I will say however that development appears to have fizzled out. I was really looking forward to some of the changes in 1.1, but it's been in pre-release for years now and doesn't seem like it's closer to being officially released.
I've largely replaced tinc with Nebula [0], but I still think fondly of it.
As trustworthy as it is, I am sadly on the hunt to replace it. Compared to wireguard, the throughput ain't great, and it takes way too much CPU on my low power nodes. I would pay good money for "tinc, but with wireguard transport" -- there's of course projects purporting to do this but I haven't found one I trust yet.
Note that "some means" of exchanging data here really is any way of communicating at all. Post an encoded string to a Mastodon server? Send you an e-mail that's automatically picked up?
It's a no for me.
IIUC that means an SSH (and/or MoSH Mobile Shell) client in a WASM WebVM in a browser tab could connect to a (tailscale (wg)) VPN mesh? (And JupyterLite+WebVM could ssh over an in-browser VPN mesh)
You'd probably need to compile a userspace wireguard implementation with a fork of the WebVM Dockerfile, or is that redundant because tailscale already wg's the sockets?: https://github.com/leaningtech/webvm/blob/main/dockerfiles/d...
It's probably fine for personal projects though, and indeed simple and very flexible (maybe too much), well suited for connecting IoT devices.
Every time tinc comes up I'm annoyed that 1.1 (which supports an improved protocol iirc and according to the doc you linked; it also has some quality-of-life improvements I put work into) hasn't been officially released, 15 years later.
[1] https://www.tinc-vpn.org/pipermail/tinc-devel/2006-January/0...
I used to provide a tunnel using tinc via a MIPS-based Cobalt RaQ. Throughput was surprisingly good, even on an old 250 MHz CPU, so even though I hear people talking about needing something faster, I can't imagine other tunneling methods being measurably faster, unless they're using weaker encryption. I'd benchmark it some time, but the slowest NanoPis that I use for tunnels these days can push many times more traffic through tinc than their Internet connections will allow. I'd be curious to see anyone else's comparisons, though.
The down side is
- single thread (perf has limits in 10gbe)
- userspace (wg can works in kernel)
- 1.1 is stable enough, but still may crash, be careful
You may also interested in n2n
Specifically, I'm wondering if it's possible to prevent outside nodes from completely establishing a connection to your nodes and therefore cause your private traffic to route over the public mesh.
That is, assuming that your Yggdrasil traffic has to route over the public Internet and is not contained within a private network itself.
It's also worth noting that Yggdrasil doesn't have the equivalent of "peer exchange" — only directly connected peers would ever find out your public IP address. Yggdrasil will not form new peerings automatically, with the single exception being multicast-discovered nodes on the same LAN.
Is that PR #1038 [1]? Any info on how to use that feature and whether it works over multicast as well?
I noticed this PR uses SHA-1 for matching fingerprints. SHA-1 has been broken for 18 years now. Is it possible to use something more secure?
> It's also worth noting that Yggdrasil doesn't have the equivalent of "peer exchange" — only directly connected peers would ever find out your public IP address. Yggdrasil will not form new peerings automatically, with the single exception being multicast-discovered nodes on the same LAN.
Right, my worry is that by having a server with a public IPv4 address and Yggdrasil running on an open port (so that my other nodes can connect to it) will allow someone else to connect to it (either on purpose or accidentally) and cause my traffic to route over their node(s) and/or the public mesh.
Thanks!
[1] https://github.com/yggdrasil-network/yggdrasil-go/pull/1038
> A shared network key, included in the tree announcements, will ensure that two nodes that peer with what should be segregated networks will ignore each other. This should make it much easier to operate private Yggdrasil meshes and not worry that they will end up accidentally peered to the public network.
[1]: https://github.com/yggdrasil-network/yggdrasil-go/discussion...
you can assign an ip to any number of nodes and tinc will talk to the one with the lowest latency. i've used this to run globally distributed dns on a tinc network
Can you (or someone) explain more in depth how that works, or how one could replicate that?
Nearly 8 years ago, still running:
$ ls -l /etc/tinc/guerby1/tinc.conf
-rw-r--r-- 1 root root 51 Jul 31 2015 /etc/tinc/guerby1/tinc.confThey're mostly finished products. That's why few updates. It's nice.
I use Zerotier because simplicity, cost, and iOS support matters more for me than speed, but I’m curious about alternatives (WG seemed much easier for me to screw up)
I see, 1.1 is still pre release.
I combine it with an ansible script to push out the (minimal) configuration to end nodes.
Besides not being free software, how does Tailscale differ from tinc?
But, for starters, Tinc is Layer 2 and TS/HS (WireGuard in reality) is Layer 3. TS/HS configuration is centrally managed, you don't have to touch anything on the clients. I think Tailscale hole punching works better, but also it might depend on your situation (DERP servers are nice, but maybe you can just add a Tinc node).
These are HS available features that I think are not available in Tinc:
Split DNS
Node registration Single-Sign-On / Pre authenticated key
Taildrop (File Sharing)
Access control lists
MagicDNS
Routing advertising (including exit nodes)
Ephemeral nodes
Embedded DERP server
But maybe you don't need that, and you rather have Layer 2 and use broadcast messages. So it depends on your needs.