[PLUG] Another network problem

Paul Heinlein heinlein at madboa.com
Sun Dec 21 18:11:02 UTC 2003


On Sun, 21 Dec 2003, AthlonRob wrote:

> >      /sbin/sysctl net.ipv4.ip_forward
>
> Interesting... why not, I wonder, just cat
> /proc/sys/net/ipv4/ip_forward ?

I've been trying to train myself to use the /sbin/sysctl interface
rather than script directly into /proc. Admittedly, it's a matter of
style, not substance. My gut feeling is that it'll protect me from
myself, esp.  when doing writes.

Plus, I tend to use 'sysctl -a' when trying to remember exactly where
something is in /proc, e.g.,

  [heinlein]$ sysctl -a 2>/dev/null | grep forw
  net.ipv4.conf.eth0.mc_forwarding = 0
  net.ipv4.conf.eth0.forwarding = 0
  net.ipv4.conf.lo.mc_forwarding = 0
  net.ipv4.conf.lo.forwarding = 0
  net.ipv4.conf.default.mc_forwarding = 0
  net.ipv4.conf.default.forwarding = 0
  net.ipv4.conf.all.mc_forwarding = 0
  net.ipv4.conf.all.forwarding = 0
  net.ipv4.ip_forward = 0

There it is, the last one! It keeps me from spelunking through /proc.
It's not a hard-and-fast thing, just an inclination.

--Paul Heinlein <heinlein at madboa.com>




More information about the PLUG mailing list