#!/bin/sh EXTERNAL_INTERFACE=ppp0 # EXTERNAL_INTERFACE=eth1 IFCONFIG=/sbin/ifconfig EXTERNAL_IP_ADDRESS=`$IFCONFIG $EXTERNAL_INTERFACE | grep "inet addr" | cut -d: -f2 | awk '{ print $1}'` echo $EXTERNAL_IP_ADDRESS # route del default # route add default gw $EXTERNAL_IP_ADDRESS