Re: sysctl, ip_forward[ing], Configure.help

Andi Kleen (ak@muc.de)
05 Jan 1998 19:17:03 +0100


alan@lxorguk.ukuu.org.uk (Alan Cox) writes:

> > fact was documented somewhere, e.g. by adding a sentence like
> > You have to enable IP forwarding by doing
> > echo "1" > /proc/sys/net/ipv4/ip_forward
> > (cc to Axel, just in case there will be a 2.0.34;
>
> This isnt correct. In 2.0.x you have to set forwarding at compile time
> unless using some vendors magically tuned krnel

Someone incorporated my old ip_forward sysctl patch into 2.0.30 (it
wasn't me, I'm not to blame). The compile time option selects only the
default too, so if the kernel is compiled with IP_FORWARD it'll do the
right thing at runtime. Setting of the sysctl is only needed when
CONFIG_IP_FORWARD isn't enabled.

If the documentation Andries is refering too doesn't specify that the
kernel needs to be compiled with CONFIG_IP_FORWARD it was all always
wrong.

I think the change in 2.0.30 was good thing though. RFC1122 requires that
IP forwarding is turned off by default, and it is inconvenient for
distributions like RedHat or SUSE to require a kernel recompile
just to enable routing or to ship two kernel binaries. The sysctl is a
much better alternative.

-A.