#!/bin/sh # # Uwe Dippel 10-11-2001 # # Script to initiate a pppd on demand # # Adopted shamelessly from RedHat's ppp-on # Idea: set all relevant parameters in the header # These parameters are passed a pppd # # These are the network parameters - Change as needed (usually not) LOCAL_IP=0.0.0.0 # Local IP address if known. Dynamic = 0.0.0.0 REMOTE_IP=0.0.0.0 # Remote IP address if desired. Normally 0.0.0.0 NETMASK=255.255.255.0 # The proper netmask if needed # # These are the parameters for serial port and modem SER_SPEED=115200 # Speed of serial port. Change for old UARTS only SER_PORT=/dev/modem # Change if different port is used # # Here we define the time after which an idle link is disconnected IDLE_LINK=600 # in seconds of inactivity # # This is the location of the chat-script which dials the phone and logs in # Please use the absolute file name. Usually no change required DIALER_SCRIPT=/etc/ppp/chat_param # # Most of the common options are selected, many redundant # Change sensibly only if required and you know what you are doing # Please, don't forget the 'lock' option or some programs such as # mgetty will not work # The asyncmap and escape will permit the PPP link to work with # a telnet or rlogin connection # Don't use the 'defaultroute' option if you currently # have a default route to an ethernet gateway # # Next we initiate pppd with any Public IP, does not matter # Later we permit any IP offered by the peer # exec /usr/sbin/pppd :202.202.188.188 \ nodetach \ demand \ idle $IDLE_LINK \ debug \ lock \ modem \ crtscts \ $SER_PORT $SER_SPEED \ asyncmap 0 \ escape FF \ $LOCAL_IP:$REMOTE_IP \ kdebug 0 \ ipcp-accept-local \ ipcp-accept-remote \ noipdefault \ netmask $NETMASK \ defaultroute \ connect $DIALER_SCRIPT # End of Script