Subject: Re: Setting up pppd. Erik
To: None <netbsd-help@netbsd.org>
From: Beaker <beaker1119@yahoo.com>
List: netbsd-help
Date: 01/27/2002 19:50:27
Hi Eric,
Yeah, getting the ppp dialup configured is a pain. Below is a little file I
made
for myself which basically lays out my working Dialup configuration. Maybe
it'll help.....
Beaker
***************************************************************

PPP for NetBSD/i386-1.5.2
-----------------------------------
This shows the various files & their contents used for my PPP dialup
connection via  external USRobotics Sportster 28,800 Fax modem
connected to tty01 (com2).

The /etc/ppp file structure:
# ls -R /etc/ppp
connect-errors *
options
pap-secrets **
peers

ppp/peers:
myisp
myisp.chat

* 'connect-errors' is an auto-generated file for debugging use.
** 'pap-secrets' should be owned by root w/ permission "600"

---
Whats in the files:

# /etc/ppp/options
/dev/tty01
lock
crtscts
115200
modem
defaultroute
noipdefault

# /etc/ppp/pap-secrets
me@myisp.net * my_secret_password

# /etc/ppp/peers/myisp
connect '/usr/sbin/chat -v -f /etc/ppp/peers/myisp.chat'
noauth
user me@myisp.net
remotename myisp.net
debug

# /etc/ppp/peers/myisp.chat
ABORT BUSY
ABORT "NO CARRIER"
ABORT VOICE
ABORT "NO DIALTONE"
'' AT
OK AT&F1
OK ATDT1234567
TIMEOUT 60
CONNECT ''

---
To make connecting & disconnecting easier the following
scripts are created: ppp-up & ppp-down

# /usr/local/bin/ppp-up
#!/bin/sh
MODEM=tty01
POP=myisp
if [ -f /var/spool/lock/LCK..$MODEM ]; then
 echo ppp is already running...
else
 pppd call $POP
 tail -f /var/log/messages
fi


# /usr/local/bin/ppp-down
#!/bin/sh
MODEM=tty01
if [ -f /var/spool/lock/LCK..$MODEM ]; then
 echo -f killing pppd...
 kill -HUP `cat /var/spool/lock/LCK..$MODEM`
 echo done.
else
 echo ppp is not active
fi

---
Make these scripts executable => chmod u+x ppp-up ppp-down

---
Thats pretty much it. You'll need to have superuser status to
start/stop pppd via these scripts.

To connect, type    ppp-up

To disconnect, type   ppp-down

Now go surf.




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com