cross-posted from: https://lemmy.world/post/3754933

While experimenting with ProtonVPN’s Wireguard configs, I realized that my real IPv6 address was leaking while IPv4 was correctly going through the tunnel. How do I prevent this from happening?

I’ve already tried adding ::/0 to the AllowedIPs option and IPv6 is listed as disabled in the NetworkManager profile.

  • Max-P@lemmy.max-p.me
    link
    fedilink
    arrow-up
    1
    ·
    1 年前

    Add a dummy IPv6 on the WireGuard interface, like a completely random fd00::/128 address on it so it thinks it’s IPv6 enabled. It’ll then just go nowhere as the remote end won’t accept it. You can then drop it at the firewall level before it goes into the tunnel to save some bandwidth.

    • Molecular0079@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 年前

      Thanks for the suggestion! It gave me the idea to try setting the connection profile’s IPv6 setting to either Link Local or Ignored. Both those options, along with the ::/0 in AllowedIPs, seem to work according to ipleak.net, but I am unsure what the bigger ramifications of this change are.

      • Max-P@lemmy.max-p.me
        link
        fedilink
        arrow-up
        3
        ·
        1 年前

        It’s going to still send that IPv6 traffic through the tunnel and get discarded at the other end but that’s about it. You can firewall that off if you want, ideally with a reject rule so things don’t have to timeout before realizing it goes nowhere.