January 25, 2014

Enable IP Forwarding

IP Forwarding or IP Packet Forwarding  are also know as Internet Routing. It is a process used to determine in which path a packet has to be sent.

By default, IP Packet Forwarding is disabled in Windows and Linux OS. Lets see how to Enable IP Packet forwarding in windows and linux OS.

To enable IP Forwarding in Linux OS
IP Forwarding information in Linux OS is maintained in ip_forwarding file which is located at /proc/sys/net/ipv4/
Use  following command to enable ip forwarding
#echo 1 > /proc/sys/net/ipv4/ip_forwarding

By default value in this file is "0" .  We need to change this value to "1" to enable ip forwarding.

To enable IP Forwarding in Window OS

Start Registry Editor by typing regedit in command prompt.
In Registry Editor, locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters

Set the following registry value:
Value Name: IPEnableRouter
Value Type: REG_DWORD
Value Data: 1


A value of “1” is to enable TCP/IP forwarding for all network connections that are installed whereas value of “0” is to disable TCP/IP forwarding.

Quit Registry Editor

Press  Win+R and type "services.msc" and then press enter to open Windows Service. In services select service "Routing and Remote Connection". Open its properties by double clicking and change the Startup type from "disable" to "Automatic".

No comments:

Post a Comment