"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, [email protected]
LinuxCare, http://www.linuxcare.com/


(?) IP forwarding and Linux

From Hal Pomeranz on Mon, 26 Jul 1999

Jim--

I admit that I'm being lazy and not searching for the answer in a FAQ, but could you tell me the right incantation under Linux to disable IP forwarding on multi-homed machines. Thanks muchly in advance!

--Hal

(!) It's already the default setting for most Linux kernels. However, you can force it with:
echo 0 > /proc/sys/net/ipv4/ip_forward
(you can 'cat' the contents of that node to view the current setting). It's more commonly necessary to use:
echo 1 > /proc/sys/net/ipv4/ip_forward
... to ENABLE the forwarding.
Of course this assumes that you have /proc enabled in your Linux kernel (also the default and STRONGLY recommended). I believe there's also a sysctl() interface to this, in case you've stubbornly built your system without /proc support (and replaced the entire procps suite of utilities including your 'ps' command).


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 44 August 1999
HTML transformation by Heather Stern of Starshine Techinical Services, http://www.starshine.org/


[ Answer Guy Index ] 1 4 7 9
11 12 14 17
18 19 20 21 24 25 26
28 29 30 31 32 33 34
35 36 37 38 39 40 41
42 43 44 45 46 47 48


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]