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_forwardas well assysctl net.ipv4.ip_forwardshows 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.confhas 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 = 0be disabled permanently? - Even if
net.ipv4.ip_forward = 0is 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
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.