Linux Router

John Chambers jc at trillian.mit.edu
Fri Mar 4 15:15:57 EST 2005


dsr wrote:
| On Fri, Mar 04, 2005 at 01:57:03PM -0500, Andrew Medico wrote:
| > Does anyone have any pointers on setting up a Linux machine as a
| > router between different networks (not using NAT)? Thanks.
|
| Oh, that's easy.
|
| Configure each ethernet port. Add an explicit route for each
| network. Check that you can ping both networks.
|
| echo 1 > /proc/sys/net/ipv4/ip_forward
|
| Done.

You may also need to tell some machines  on  either  side  that  your
machine  is  the router.  Depending on their software and how they're
configured, they may or may not discover this on their own.   If  you
don't know this, you can just wait a bit, and see which if any of the
machines aren't talking to anyone on the other side.

I've seen a lot of cases where one or two machines was set up with  a
set of fixed routes, and didn't discover new gateways or routers.  In
other cases, everything discovered the new router automagically.




More information about the Discuss mailing list