Why is 'ip_forward' enabled by default upon boot in Red Hat Enterprise Linux?
Issue
-
Upon boot, the output of
/proc/sys/net/ipv4/ip_forward
as well assysctl net.ipv4.ip_forward
shows ip_forward as enabled:$ cat /proc/sys/net/ipv4/ip_forward 1 $ sysctl net.ipv4.ip_forward net.ipv4.ip_forward = 1
-
However,
/etc/sysctl.conf
has the parameter disabled by default:$ grep ip_forward /etc/sysctl.conf net.ipv4.ip_forward = 0
-
-
Why can't the kernel parameter
net.ipv4.ip_forward = 0
be disabled permanently? - Even if
net.ipv4.ip_forward = 0
is set in/etc/sysctl.conf
, ip forwarding does not get disabled after reboot
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.