Leased line router

This setup is very similar to the dialup on demand router setup, but you may need to edit file /rc/rc_lease according your specific conditions.

#!/bin/sh
#
# Start leased line router (gateway - MODEM0)

. /etc/system.cfg
. /etc/live.cfg
. /etc/chat.pwd

if [ "$1" = stop -o "$1" = restart ]; then
        echo -n "Stopping pppd...                       "
        killall pppd
        $DONE
        [ "$1" = stop ] && exit
fi

[ "$MTU0" ] && MTU="mtu $MTU0"
[ "$MRU0" ] && MRU="mru $MRU0"
[ "$LOCAL$REMOTE" ] && LOCAL="$LOCAL:$REMOTE"
if [ "$ADRTYPE" = dynamic ]; then
        NOIP=noipdefault
fi

echo -n "Starting pppd...                       "
pppd /dev/$MODEM0 $MSPEED0 crtscts modem defaultroute $MTU $MRU $NOIP \
                           passive $LOCAL persist -pap -chap
if [ $? = 0 ]; then
        $DONE
        [ "$GATEWAY" ] && route add default gw $GATEWAY
        [ "$DYNNAME" ] && dyndns
fi
 
freesco/manuals/027/3.5_leased_line_router.txt (43546 views) · Last modified: 2005/09/14 00:49 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki