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.
You can either route IPv6 through the tunnel, or if the tunnel doesn't support it, you have to block it somehow if you don't want it going out to the Internet. You can do that by creating a firewall rule to block it on your host or network, or by disabling IPv6 entirely at the host or network level.
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.
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.
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.