Hi,
I’m trying to permanently disable IPv6 because it causing leak with my VPN.
Doing this, I can disable it for the session, but IPv6 will re-enable after reboot:
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
I tried making sysctl.d config /etc/sysctl.d/99-disable-ipv6.conf:
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
# Loopback device
# net.ipv6.conf.lo.disable_ipv6=1
And do this:
sudo sysctl -p /etc/sysctl.d/99-disable-ipv6.conf
IPv6 is disabled, but still don’t survive reboot.
It turns out, when I restart NetworkManager like this:
sudo systemctl restart NetworkManager
IPv6 automatically re-enabled, even if it is previously disabled by kernel variables.
Tried adding this to /etc/NetworkManager/NetworkManager.conf:
[connection]
ipv6.method=disabled
But restarting NetworkManager still re-enable IPv6.
Tried doing these:
$ nmcli connection show --active
NAME UUID TYPE DEVICE
Wired connection 3 8ae9f6e5-b67c-3368-9740-364fa3012f06 ethernet enp7s0
lo 0932eaf2-f3f5-44ec-8279-818edf3a4d5c loopback lo
tun0 5294db2e-b6c0-45b7-9c95-fdb27b8a1911 tun tun0
$ nmcli connection show "Wired connection 3" | grep -i ipv6
ipv4.dhcp-ipv6-only-preferred: -1 (default)
ipv6.method: auto
...
$ sudo find / -name "*.nmconnection" 2>/dev/null
/run/NetworkManager/system-connections/tun0.nmconnection
/run/NetworkManager/system-connections/Wired connection 3.nmconnection
...
$ sudo cat /run/NetworkManager/system-connections/"Wired connection 3".nmconnection
[connection]
id=Wired connection 3
uuid=8ae9f6e5-b67c-3368-9740-364fa3012f06
type=ethernet
autoconnect-priority=-999
interface-name=enp7s0
timestamp=1762039409
[ethernet]
[ipv4]
method=auto
[ipv6]
addr-gen-mode=default
method=auto
[proxy]
[.nmmeta]
nm-generated=true
Now, the nm-generated=true. That would mean that the config for my ethernet connection is auto-generated.
Oh yeah, this also:
$ sudo journalctl -b | grep -i ipv6
# tons of these
Nov 10 16:01:16 omdv-01 NetworkManager[858]: <warn> [1762765276.7882] ipv6ll[8d9a7b4e90cff4dc,ifindex=2]: changed: no IPv6 link local address to retry after Duplicate Address Detection failures (back off)
Nov 10 16:01:16 omdv-01 NetworkManager[858]: <warn> [1762765276.7887] platform-linux: do-add-ip6-address[2: 2404:8000:1095:1339:7d0b:4d:b508:5678]: failure 13 (Permission denied - ipv6: IPv6 is disabled on this device)
So, how do I truly disable IPv6, the OpenMandriva way?
Thanks