routing

Frank Langtind frank at langtind.no
Wed Dec 27 16:52:04 PST 2000


I've never configured a gateway, but I got a script which supports gateway. I'll include what I believe is what you need. (Comments are partly in norwegian, but you'll figure it out.)

if (test $lan = "true")
  then  # Internet Gateway
  (
   echo 1 > /proc/sys/net/ipv4/ip_forward
   /sbin/ipchains -A forward -s $nettverksadresse -d 0.0.0.0/0 -j MASQ
   echo 7 > /proc/sys/net/ipv4/ip_dynaddr
   echo "Activating Internet Gateway"
  )
  else
  (

    echo 0 > /proc/sys/net/ipv4/ip_forward
    echo 0 > /proc/sys/net/ipv4/ip_dynaddr

# Forsikre oss om dette er / ikke er en callback server
  if ( test $callback = "true")
  then
  (
    echo 1 > /proc/sys/net/ipv4/ip_forward
    echo 1 > /proc/sys/net/ipv4/ip_dynaddr
  ) # Callback server
  fi

# Forsikre oss om dette er / ikke er en dialin server
  if ( test $dialinonly = "true")
  then
  (
    echo 1 > /proc/sys/net/ipv4/ip_forward
    echo 1 > /proc/sys/net/ipv4/ip_dynaddr
  ) # Dialin server
  fi



  ) # Internett Gateway
fi
}

In addition you probably need to include defaultroute as option when starting ipppd (see man-page).

Frank

28.12.2000 01:24:28, "Matthias Minich" <matthias at planet-minich.de> wrote:

>yes...
>
>your *articulation* was ok... (routers work at layers 2 _and_ three, don't
>they? whatever...)
>
>so i have to find an option to define the default gateway of my ipppd (same
>as pppd, just for isdn). does anybody know, where to find it?
>
>matthias minich
>
>
>-- 
>Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
>and put unsubscribe in the subject header of the message
>
>




-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list