A question re. #wireguard

When I’m away from home I usually connect to my home (US) and my server (Europe). However sometimes (not always) the connection to my home is blocked, I don’t know if it is caused by my phone company or my ISP. I blame the latter, because the connection to my european server never fails.

I wonder if there is something I can do in those cases?
I guess I could try to redirect the traffic to use the european server as a proxy, but that would make things slower the 90% of the time this isn’t a problem. Also, this would require me to switch wireguard connections manually, which is not ideal, especially if I’m driving.

Another alternative would be tailscale (maybe with headscale), but I’d rather keep my infrstructure as wireguard only.

Any ideas? cc @[email protected] @[email protected]

  • just_another_person
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    2
    ·
    6 months ago

    If Wireguard loses its connection, it doesn’t automatically requery the host and reconnect AFAIK. So if name resolution fails, or you’re on dynamic DNS and the IP changes, it’s not going to fix itself.

      • vividspecter@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 months ago

        Or just use tailscale/headscale/netbird and keep the underlying wireguard performance.

        • MangoPenguin@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          Tailscale in my experience does not run as kernel mode wireguard so performance is not great, but maybe that’s changed.

          Not sure about Netbird, but the Android app reviews are poor and it does not sound reliable.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      And by default, WireGuard doesn’t keep the connection alive when there’s no traffic. You can tune this in settings, which I’ve done because I’m behind CGNAT and need a persistent connection.

      • lorentz@feddit.it
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        Could it be that the domain name has both IPv4 and IPv6 and depending on the network you try to reach one or another? Wireguard can work on both protocols, but from my experience it doesn’t try both to see which one works (like browsers do). So if at the first try the dns resolves the “wrong” IP version, wireguard cannot connect and doesn’t fallback trying the alternative.

        • Alvaro@social.graves.clOP
          link
          fedilink
          arrow-up
          3
          arrow-down
          2
          ·
          6 months ago

          @[email protected] no, the issue is not keepalive, since it cannot connect in the first place… moving to another wifi (instead of celullar) works fine, so it is not a problem with my configuration.

          • just_another_person
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            edit-2
            6 months ago

            You might want to put these pertinent details in your post.

            If you’re on a cellular network that has CGNAT, Wireguard may not be able to work. Same deal if it’s an IPv6 network.