> On Sun, 08 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in
>> I have two physical networks, and I want to set up a Linux router
>> between them.
> Been done tens of thousands of times. Did you glance through the
> HOWTOs that should be included on your system?
> 40490 Jun 22 2000 Home-Network-mini-HOWTO
> 45604 Apr 18 2006 Networking-Overview-HOWTO
> 71626 Apr 4 2004 Unix-and-Internet-Fundamentals-HOWTO
> Those are merely the first ones to come to mind. There is also the
> Linux Network Administrator's Guide from the LDP - also should be on
> your system - look for the 'nag2'
>> 1. I have Computer A with IP address 192.9.200.1 on Network 1.
>> 2. I have Linux Computer B on Network 1, with an ethernet interface
>> having the address of 192.9.200.2. That same Linux Computer B has
>> another ethernet interface with address 7.48.29.220 on Network 2.
>> 3. Finally, I have Computer C with IP address 7.48.29.221 on Network
>> 2.
> OK - but see RFC3330 which lists a whole bunch of address ranges you
> can use - rather than "real" ones (192.9.200.1 is assigned to Sun
> Microsystems - 7.48.29.221 is a reserved address).
>> I want Computer A to talk to Computer C, and I want Computer C to talk
>> to Computer A. The question is: How do I set up Computers A, B, and C
>> to make this happen?
>> I think I have to do the following:
>> o Add a route to Computer A that says whenever I want to send to
>> Computer C, go through Computer B.
>> route add <Computer C - 7.48.29.221> <Computer B - 192.9.200.2>
> man route the syntax could be
> /sbin/route add -host 7.48.29.221 -gw 192.9.200.2
> but all distributions have their own "cute" helper programs that can
> be configured to do this. Each distribution knows how to do it better
> than anyone else, so each uses different files and different formats.
>> o Set up Computer B to pass packets from both networks
>> turn on IP packet forwarding
>> Is that all?
> Basically, yes. Again, each distribution has their own cute way of
> configuring this, but the results are the same.
>> Or do I need to add routes like this?
>> route add 192.9.200.1 <Network 1>
>> route add 7.48.29.221 <Network 2>
> Those should be added automatically when the boot scripts bring up
> each interface.
>> o Add a route to Computer C that says whenever I want to send to
>> Computer A, go through Computer B.
> As above
>> Does this look right?
> On computer "A" and assuming a /24 mask, rather than host routes, and
> ignoring the loopback:
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.9.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 7.48.29.0 192.9.200.2 255.255.255.0 UG 0 0 0 eth0
> On computer "B":
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.9.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 7.48.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
> On computer "C":
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 7.48.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 192.9.200.0 7.48.29.220 255.255.255.0 UG 0 0 0 eth0
> Piece of cake!
> Old guy
Thanks much, Moe! I'll give it a try, let you know how it goes.