How To Configure Linux As A Router

RegisterLogin
How To Configure Linux As A Router
Post Description: if you are setting your linux server as a router, there is one item you may need to adjust
Tags: how, to, configure, linux, as, a, router
This Post Was Posted On Feb 28, 2010 By Webune Support #3202
if you are setting your linux server as a router, there is one item you may need to adjust. normally, a linux system will not forward packets it receives from one system that are directed at another system. if linux is to act as a router, it has to accepts these packets and send them on to the destination network. to enable this feature in linux, you have to modify a key file in the /proc filesystem. for example, you would use this command:

echo "1" > /proc/sys/net/ipv4/ip_forward


this commands enables IP forwarding.

ok, so if you are the changes to be permanent, then you will have to edit the configuration file: /etc/sysctl.conf

so when you open the /etc/sysctl.conf set the following as:

net.ipv4.ip_forward = 1

if you have a different distribution, you may have a different configuration file like /etc/sysconfig/sysctl and the line reads: IP_FORWARD

for example, if you have a REDHAT, FEDORA, CENTOS distribution you would use the /etc/sysctl.conf file and edit the line:

# Controls IP packet forwarding
net.ipv4.ip_forward = 1
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2012 Webune Forums - Sat Dec 15, 2012 5:32 pm
Powered by: Webune Forums V3