IPV6 leaking in KDE NetworkManager OpenVPN addon

I’m using the in-built OpenVPN addon for KDE NetworkManager as it provides autoconnect and a nice visual indicator in the status bar. But it’s leaking my IPV6. I’ve added the following lines to my .ovpn file to block IPV6 and fix DNS leaks :

ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1
redirect-gateway ipv6

script-security 2
setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
up /usr/bin/update-systemd-resolved
down /usr/bin/update-systemd-resolved

It does work when used from terminal but loading this file into KDE NetworkManager leaks IPV6. Please help.

Why not just disable IPv6 if you don’t want to use it?

Sounds like you have ticked the “use this connection only for resources on its network” box,


That’s what I’m currently doing, but since it’s possible to disable it only while VPN is on using the OpenVPN client directly, I thought it should be possible to do it using the addon as well.

I don’t have it ticked. In fact, ticking it in the ethernet’s IPV6 route settings or disabling IPV6 works but that isn’t ideal since I have to do it for each new connection manually.

This can be dealt with by blocking IPV6 systemwide using sysctl but again that’s not ideal. I know that in Debian we can disable IPV6 when a specific network interface (e.g. tun0) is up using /etc/network/if-(up/down).d/. Is something like that doable in here?