Sunday, December 25, 2005

Enable IP Routing on various systems

... This topic is a quick help to enable IP routing as fast as possible on various systems & platforms without needing to another program to be run or so on.
Beginners Note:
IP routing also known as IP Forwarding, needs when the system has more than one NIC or network interface or network connection (such as LAN connection, PPP,...) & you want to route between them to provide for example a gateway, NAT, firewall,... .

1. Cisco Routers/Access Servers :
IP routing is automatically enabled in the Cisco IOS software for routers. To reenable IP routing if it has been disabled on "Global Configuration" type: IP Routing

2. All Microsoft Windows Platforms :
Run "regedit" program and go to the following path :
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
then change the REG_DWORD value (or add new if no exists) from "0" to "1" and reboot the system.

3. Linux :
Add the following command to "/etc/rc.local" then reboot :
echo 1 > /proc/sys/net/ipv4/ip_forward
Or ff you're running Debian linux, you can just put :
ip_forward=yes
spoofprotect=yes
in /etc/network/options

4. BSD Unix Family :
On "/etc/rc.conf" change the following variable to "YES" then reboot :
gateway_enable=YES
For on demand routing enable/disable using sysctl for "net.inet.ip.forwarding" either to "1" or "0".

5. Sun Solaris :
Run this command at prompt:
ndd -set /dev/tcp ip_forwarding 1
But this only lasts until reboot.
To make this happen every boot, put it in a shellscript in /etc/rc2.d -- it must run after S69inet, so call it something like S70ipforwarding
Under certain circumstances (such as more than one interface and no default router), ip_forwarding is automatically turned on, but the precise circumstances vary with Solaris releases, and never suit everyone.

6. Novell Netware :
Edit autoexec.ncf, look for the "load tcpip" line.
Change it to read "load tcpip forward=yes".
Reboot.