next up previous contents index
Next: Servers Up: Home Networking Previous: Network Address Translation   Contents   Index

Enabling Routing

On Red Hat Linux machines and many other Linux Distributions the network packet routing is turned off by default. This is more of a safety issue than anything else. If the computer does not route packets then there is less risk involved with routing attacks. To turn the routing on you need to set the boolean kernel perameter called ip_forward to true. This can be done using the following command:

bash# echo 1 > /proc/sys/net/ipv4/ip_forward

While this does work to turn the routing on, it is best to make sure you know how to keep it on. If you put the above line in one of the startup files then you can be sure that routing will be enabled every time you turn the computer on. The following command would do this:

bash# echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> \
      /etc/rc.d/rc.local

If you mess up and mistype the above line you could do a lot of damage, so make sure you type it right. If you are not willing to mess up badly then you can use an editor instead to add the first line to the end of the /etc/rc.d/rc.local file.


next up previous contents index
Next: Servers Up: Home Networking Previous: Network Address Translation   Contents   Index
Joseph Colton 2002-09-24