Linux-Hams archive - November 1997: Re: IP Forwarding in Linux

Re: IP Forwarding in Linux

Terry Dawson (agpkpq.hkpxi@ncb.ie)
Mon, 03 Nov 1997 12:55:23 +1100


Richard Adams wrote:

> > I have compiled a kernel before so that shouldn't be too bad. I guess
> > what I'm really asking is... is there a way to tell if IP_FORWARDING is
> > active in a given kernel? I thought someone said that you could look in
> > /proc/net somewhere, but I don't recall the exact details.
>
> If they did they are wrong, or at least wrong as far as "your" kernel
> version. In kernel 2.0.29 this was NOT included, but IS presant in 2.0.30
> and higher.
> Anyway its not /proc/net its /proc/sys/net/ipv4 or 6 thesedays also.

Well actually, whoever told him that is correct.

The very first entry in /proc/net/snmp is a flag indicating whether
IP_forwarding is enabled or not.

In 2.1.* kernels you can dynamically enable/disable ip_forwarding
using a /proc/sys/net/ entry.

regards
Terry