Network Config

Paul W. Frields paul at frields.com
Wed Oct 22 13:04:32 UTC 2003


On Wed, 2003-10-22 at 08:33, JDK wrote:
[...snip...]
> > Should use a static IP for eth1 as it won't be getting an address from
> > your router.  You will also probably need to turn on ip_forward so eth0
> > will allow eth1 traffic out.  And you will probably have to use Guardian
> > to setup masquerading for the Kids box to pass through.
> 
> Thanks.  Can someone tell me what is the Red Hat way to turn on
> ip_forward?  Is there a network options item, or do I just need to add
> something to the firewall script?  Will the kids PC need a static IP,
> or will if get DHCP from the router once I enable the IP forward?

To turn it on now:

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

To make the change persistent, put the following line in
/etc/sysctl.conf (there's probably a "dummy" placeholder there right
now):

  net.ipv4.ip_forward = 1

I think what the Mike Chambers was telling you was that you will want
static IP addressing on the NIC that is networked with the kids' PC.
Note that you will need to make sure you are configuring the right card,
since it can get confusing if what you think is eth1 is actually eth0!
:-)  Not to be pedantic, but just in case: generally you would connect
the 2nd NIC in the Linux box and the NIC in the kids' PC to a hub in
between, but you can connect them directly with a crossover Ethernet
cable. (Using a hub instead means, for instance, that [A] you can expand
this little project to encompass more computers later, and [B] you don't
have to spend the extra few minutes to find, buy or make a special
crossover cable.)

The kids' PC should also be set up as static. It might be easy to make
your Linux box eth1 address something like 192.168.5.254, and your kids'
PC address 192.168.5.1. (I am assuming and hoping your existing router
address space is different.) You don't want to use DHCP there because it
will probably confuse your cable modem, which is likely set to provide
only one IP address unless you've paid for more with your provider. Hope
this helps, and please feel free to e-mail me offlist if you need more
help.

-- 
Paul W. Frields <paul at frields.com>





More information about the test mailing list