What's the best way to prevent IPv6 from leaking when using Wireguard?

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.

Quereller ,
@Quereller@lemmy.one avatar

Maybe you need to set up an iptables firewall rule? In this document they call it kill switch.

BTW. Mullvad has many usefull WG generic guides in their help section.

Molecular0079 OP ,

Thanks! This works, but only if I use wg-quick. If I import the connection into KDE’s NetworkManager it doesn’t. I am assuming its because it isn’t running the PreDown and PostUp commands.

Quereller ,
@Quereller@lemmy.one avatar

Hmm, I found that …geek.nz/…/using-iptables-with-network-manager/

But it seems to be fairly complex and you would even have to change the script to only handle the WG device.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • wartaberita
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • TheResearchGuardian
  • Ask_kbincafe
  • KbinCafe
  • Testmaggi
  • Socialism
  • feritale
  • oklahoma
  • SuperSentai
  • KamenRider
  • All magazines