Friday, May 25, 2012

Checking whether IP forwarding is enabled on your Linux Box

Gateway provides a local private network to have access to the internet. To do a quick check whether the IP forwarding is enabled on your machine, do a simple

# cat /proc/sys/net/ipv4/ip_forward

If the output is 0, then IP forwarding is not enabled. If the output is 1, then IP forwarding is enabled
If your output is 0, you can enabled it by running the command
# echo 1 > /proc/sys/net/ipv4/ip_forward
Running the command cat /proc/sys/net/ipv4/ip_forward and it should show 1

For more information, do look at the article Installing and configuring a Linux gateway

No comments: