I think the problem is I do not have a gateway for the Eth1 interface. Here is a copy of my /etc/rc.d/rc.inet1
 
#! /bin/sh
#
# rc.inet1      This shell script boots up the base INET system.
#
# Version:      @(#)/etc/rc.d/rc.inet1  2.00    10/06/1999
#
 
HOSTNAME=`cat /etc/HOSTNAME`
 
# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
 
# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface.
 
# Edit these values to set up a static IP address:
IPADDR="64.31.83.68"    # REPLACE with YOUR IP address!
NETMASK="255.255.255.192"       # REPLACE with YOUR netmask!    
NETWORK="64.31.83.68"   # REPLACE with YOUR network address!
BROADCAST="64.31.83.127"        # REPLACE with YOUR broadcast address, if you
                        # have one. If not, leave blank and edit below.
GATEWAY="64.31.83.65"   # REPLACE with YOUR gateway address!
 

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth1 interface.
 
# Edit these values to set up a static IP address:
IPADDR2="192.168.0.5"   # REPLACE with YOUR IP address!
NETMASK2="255.255.255.0"        # REPLACE with YOUR netmask!
NETWORK2="192.168.0.0"  # REPLACE with YOUR network address!
BROADCAST2="192.168.0.255"      # REPLACE with YOUR broadcast address, if you
                        # have one. If not, leave blank and edit below.
GATEWAY2="192.168.0.5"  # REPLACE with YOUR gateway address!         

# To use DHCP instead of a static IP, set this value to "yes":
DHCP="no"            # Use DHCP ("yes" or "no")
 
# OK, time to set up the interface:
if [ "$DHCP" = "yes" ]; then # use DHCP to set everything up:
  echo "Attempting to configure eth0 by contacting a DHCP server..."
  /sbin/dhcpcd
elif [ ! "$IPADDR" = "127.0.0.1" ]; then # set up IP statically:
  # Set up the ethernet card:
  echo "Configuring eth0 as ${IPADDR}..."
  /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
 
  echo "Configuring eth1 as ${IPADDR2}..."
  /sbin/ifconfig eth1 ${IPADDR2} broadcast ${BROADCAST2} netmask ${NETMASK2}
 
  # If that didn't succeed, give the system administrator some hints:
  if [ ! $? = 0 ]; then                          
    cat << EOF
Your ethernet card was not initialized properly.  Here are some reasons why this
may have happened, and the solutions:
1. Your kernel does not contain support for your card.  Including all the
   network drivers in a Linux kernel can make it too large to even boot, and
   sometimes including extra drivers can cause system hangs.  To support your
   ethernet, either edit /etc/rc.d/rc.modules to load the support at boottime,
   or compile and install a kernel that contains support.
2. You don't have an ethernet card, in which case you should comment out this
   section of /etc/rc.d/rc.inet1.  (Unless you don't mind seeing this error...)
EOF
  fi
 
  # Older kernel versions need this to set up the eth0 routing table:
  KVERSION=`uname -r | cut -f 1,2 -d .`
  if [ "$KVERSION" = "1.0" -o "$KVERSION" = "1.1" \
   -o "$KVERSION" = "1.2" -o "$KVERSION" = "2.0" -o "$KVERSION" = "" ]; then
    /sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
    /sbin/route add -net ${NETWORK2} netmask ${NETMASK2} eth1
  fi
 
  # If there is a gateway defined, then set it up:
  if [ ! "$GATEWAY" = "" ]; then
    /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1
  fi
fi
 
#/sbin/ifconfig eth1 192.168.0.5
#/sbin/route add -net 192.168.0.0 eth1
#/sbin/route add -net ${NETWORK2} default gw ${GATEWAY2} netmask 255.255.255.0 $
 
# End of rc.inet1                               
 
How do I make eth1 default to the 192.168.0.5 gateway for IP forwarding?
 
Thanks
Scott

Reply via email to