ppp and ip-up
Does ppp run the ip-up and ip-down scripts for incoming connections
as well as outgoing? I added some commands to my ip-up on the server
to set up extra routes when I dial in, but they don't seem
to get run.
# $Id: ip-up,v 1.1 1996/01/31 21:25:59 alvar Exp $
# This script is run by the pppd after the link is established.
# It should be used to add routes, set IP address, run the mailq
# This script is called with the following arguments:
# Arg Name Example
# $1 Interface name ppp0
# $2 The tty ttyS1
# $3 The link speed 38400
# $4 Local IP number 188.8.131.52
# $5 Peer IP number 184.108.40.206
# The environment is cleared before executing this script
# so the path must be reset
USERNAME=`w | grep $2 | perl -e '$_ = <STDIN>; s/(.+?) .+/\$1/; print;'`
# if it's hamish, add a route to his half of the subnet
if [ $USERNAME = "hamish" ]; then
route add -net 220.127.116.11 netmask 255.255.255.128 $1
# last line
I understand that $2 could include /dev/ as well, which would
break my script; I haven't checked this out yet. Or is ip-up not run at all
for incoming connections?
Hamish Moffatt, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org
Latest Debian packages at ftp://ftp.rising.com.au/pub/hamish. PGP#EFA6B9D5
CCs of replies from mailing lists are welcome. http://hamish.home.ml.org
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .