I’ve been accessing my servers over Yggdrasil for the last few years and I never see it mentioned in self hosting communities, so here you go !

Yggdrasil works over IPv6 and brings encryption at the network interface level (similarly to a VPN). The cool thing is that your IP address is derived from your private key, so when you try to connect to a specific IP, your packets are encrypted so that ONLY the destination server can decrypt it (thus preventing MITM attacks). And as everything is encrypted at the NIC level, you can safely use plain text protocols ;)

How cool is that ?

  • dirtyrig@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Thanks for sharing. I recall hearing about this before. After reading this thread I’ve been trying to vend some of my selfhosted apps over yggdrasil. The documentation is difficult to find. A good tutorial would be really useful. Here are my two biggest stumbling blocks headaches:

    1. ipv6 headache: I had to update my server host binding from 0.0.0.0 to :: (from ipv4 to ipv6). Apparently ipv4 still works but now ipv6 also works. This was the biggest blocker for me gaining access to my apps over yggdrasil using ipv6.
    2. yggdrasil.conf headache: ipv6 syntax issues (apparently I need to learn me some ipv6 stuff) You need to put ipv6 ip addresses in brackets. This is an excerpt from my Listen attribute in my yggdrasil.conf file.
      # Listen addresses for incoming connections. You will need to add
      # listeners in order to accept incoming peerings from non-local nodes.
      # Multicast peer discovery will work regardless of any listeners set
      # here. Each listener should be specified in URI format as above, e.g.
      # tls://0.0.0.0:0 or tls://[::]:0 to listen on all interfaces.
    Listen: [
              tls://[::]:8000
              tls://[::]:8080
    ]
    

    I also downloaded an yggdrasil vpn app for Android and was able to access both apps with Android after adding a peer connection in the settings. Later, I added my Android public key to the AllowedPublicKeys to lock down my apps to be only accessible to my client.

    Thanks @wgs for the tip! 🏆

  • BrianTheeBiscuiteer@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Doesn’t seem like a direct replacement. A VPN will anonymize you when connecting via regular protocols. This is kind of its own protocol. If your intended destination doesn’t use Yggdrasil then you can’t talk to them. Do I have that right? Not saying it’s bad, it’s just not equivalent.

    • peregus@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      VPN per sé is a connection between 2 points (Virtual Private Network) so that the remote host can be reachable with a private IP and doesn’t meet this be public;, what you’re talking about is VPN services (ProtonVPN, NordVPN, etc.) that are used to bypass Internet blocks and makes you appear as you are accessing Internet from a different location.

  • citytree@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Does this require a static IP address? Can it be easily used when all nodes are behind a NAT with dynamic IP addresses?

    • z3bra@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      No static IP required ! I use it on my phone over LTE and it works great. Same goes for the NAT, I use it at work to where my laptop sits behind a NAT and I don’t have any issue.

      • axzxc1236@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        From my understanding by reading the website, if non of your devices have a static IPv6 address, you need to add a public node, is that true?

  • epocsquadron@kbin.social
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    🤯That is super cool! Is there a good comparison between this and WireGuard from a security perspective? I know Cloudflare is moving away from WireGuard and implementing MASQUE which uses HTTP/3+QUIC. Wonderful to see multiple attempts at this, interested to see what gets the adoption.