Following this closed topic: https://forums.opensuse.org/t/sysctl-conf-still-being-ignored-on-boot
I did a lot of what is on this thread with same issues. I did manage to figure it out in my case. I created a config file in ‘/etc/sysctl.d/ipv6.conf’ with the following settings:
This doesn’t stop the IPv6 from enabling on the network adapter. Run command nmcli to show your network adapters and disable IPv6 on adapters. The NetworkManager has the ethernet device set to ‘auto’ and seems to override and enable IPv6.
# nmcli connection show
NAME UUID TYPE DEVICE
ens33 275a9ddd-63ef-3194-b8fa-0d3896225367 ethernet ens33
lo dc0b56e4-ba10-4486-8c60-c7032502f44c loopback lo
# nmcli connection modify ens33 ipv6.method "disabled"
# cat /etc/NetworkManager/system-connections/ens33.nmconnection
[connection]
id=ens33
uuid=275a9ddd-63ef-3194-b8fa-0d3896225367
type=ethernet
interface-name=ens33
timestamp=1709331243
[ethernet]
[ipv4]
method=auto
[ipv6]
method=disabled
[proxy]
If you land on this post an no others, hope this helps the suffering on this item
Personally, I have a struggle with this… even trying to “force it” by creating my own service in systemd and setting
After=network-online.target
But it doesn’t work. so I manually start that exact service after I login for the first time. I’m at a loss for making this happen. Full service unit below (below might look insane, it works, just me trying various things to make things work and failing):
My point is the settings don’t take via sysctl.conf or sysctl.d/file etc. or even with a systemd service. But if I do it after I login… then ok. But because direction is lost on this… here are the lines in my sysctl.conf:
Because those settings do not exist until br_netfilter module is loaded and this module is not loaded by default, so is not present during standard sysctl processing on boot.
Makes sense, so, while I know Lennart “there is no valid use case” P doesn’t allow any sort of “final” start, do you know of a place to put the unit file sequence wise?
This custom service is a hack, systemd can do this natively.
You can enable the module to be loaded on boot using modules-load.d(5) and it will be loaded in time before sysctl settings from /etc/sysctl.d are applied.
I use NFS, so I made it dependent on that (After=) and that worked. Not sure why inbetween (that is after network) (the thing before NFS) didn’t work, but ok.