Kernel parameters described in /etc/sysctl.conf are not reflected after reboot
Issue
We see our settings in /etc/sysctl.conf ignored. We have this in /etc/sysctl.conf:
net.ipv4.conf.all.forwarding=0' >/etc/sysctl.conf
net.ipv4.conf.default.forwarding=0' >>/etc/sysctl.conf
When then executing sysctl -p, we see that these are set correctly:
[root@rhel8u4a ~]# sysctl -a | egrep 'net.ipv4.conf.all.forwarding|net.ipv4.conf.default.forwarding'
net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.default.forwarding = 0
However, after restart of the system, we see that both sysctl are set to 1:
[root@rhel8u4a ~]# sysctl -a | egrep 'net.ipv4.conf.all.forwarding|net.ipv4.conf.default.forwarding'
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.default.forwarding = 1
These unexpected sysctls are seen on systems with package group @graphical-server-environment installed.
Environment
- Red Hat Enterprise Linux (RHEL), various versions
- sysctl
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.