Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ENCORE.COM!bzs From: bzs@ENCORE.COM (Barry Shein) Newsgroups: comp.protocols.tcp-ip Subject: IP forwarding on Suns Message-ID: <8906120247.AA21216@multimax.encore.com> Date: 12 Jun 89 02:47:06 GMT References: <8906051707.AA01766@work1.icase.edu> Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 31 >Does anyone know what the Sun default (OS3.5) is for forwarding IP packets >when one with a different net address is received? Assume the Sun only has >one e-net connection. (Right, it's not a gateway, but the 'foreign-net' >packets are there, and I can't get rid of them.) Depends on the state of the ipforwarding bit in the kernel. By default this is on so the Sun will indeed forward the packets. To stop that patch the word in the kernel to zero, something like (WARNING WARNING OFF THE TOP OF MY HEAD!!!) % adb -k -w /vmunix /dev/mem ipforwarding?W 0 $ % Should take effect on the next boot tho you could patch the running image. Wait a few minutes, someone on this list will say "oh yeah" and correct me if that example isn't quite right. It's defined in ip_input.c (.o) in the kernel build tree, if you patched it there it would stay patched but that might be annoying also if you ever build machines that are supposed to act as gateways, very mysterious months later when someone builds a kernel and it won't forward packets, I suppose you could have both versions and use a build script to install the right one. -Barry Shein Software Tool & Die, Purveyors to the Trade 1330 Beacon Street, Brookline, MA 02146, (617) 739-0202