How Yo Git PPP T'Wawk on Yer Linux Box
Ah will admit thet a lot of these supposed PPP setup thin'amabob
programs (expecially fo' X) an' preconfiggerd scripps, etc., eifer
doesn't wawk, o' is pow'ful hard t'figger out. ah foun' thet like a
lot of thin's when it comes t'Linux, it's bess to hoof it in thar an'
root aroun' wif it like a groun' hog, acco'din' t' th' code o' th'
heells! ah ended up hackin' out mah own PPP/chat scripp, which was
about 10 times simpler than th' ones thet came wif th' various
distribushuns an' whutnot. Th' bess source of info on this hyar stuff
is th' pppd an' chat man pages an' th' docs thet come wif th' source
code fo' pppd, cuss it all t' tarnation.
So these hyar is th' scripps thet ah used t'use. A bunch of varmints
have used them successfully t'git PPP up an' runnin'... so mebbe they
will he'p yer kin too...
Th' fust thin' yo' hafta does is getcher serial po'ts runnin' real
fine. Yer hankerin' t'lock th' po't at as high a speed as postible,
an' turn hardware han'shakin' on, as enny fool kin plainly see. Yer
Linux distro probably already comes wif an rc.serial o' sumpin like it
thass helter-skelter at boottime. So yer hankerin' t'set it up wif
similar comman's t'th' rc.serial file below. Tess th' modem wif
minicom o' kermit. Eff'n spd_vhowdy-doo wont wawk, go fo'
spd_howdy-doo (57.6kb). Note thet mah setup is fo' COM2 (cua1). Eff'n
yer hankerin' these scripps t'wawk on COM1, change all occurrences of
cua1 to cua0.
/etc/rc.d/rc.serial
# Set up the serial port to go to 115,200 baud
# when 38,100% requested
/bin/setserial /dev/cua1 uart 16550A port 0x2f8 irq 3 spd_vhi
# make sure hardware handshaking is on
stty crtscts < /dev/cua1
# Display serial device configuration
/bin/setserial -bg /dev/cua*
|
Next yo' need t'establish th' link t'yer ISP (ppp-on scripp). The
scripp below gits pppd t'dial up yer service provider, helter-skelter
chat, which will read chat scripp comman's outta /etc/ppp/dial-tlg,
an' set th' default route. Couple of thin's t'note. Th' file wif mah
chat scripp in it is called "dial-tlg" on account o' mah service
provider used to be TLG (Th' Li'l Garden), which don't exist enny
mo'e. ah doesn't do PPP ennymo'e (got DSL), so yo' kin change this
hyar to be ennythin' yo' want (e.g, acco'din' t' th' code o' th'
heells!: dial-yournerviceprovidersname). Secondly, th' lines below
thet look like this:
/usr/sbin/pppd connect '/usr/sbin/chat -v -f /etc/ppp/dial-tlg' \
/dev/cua1 57600 crtscts lock debug modem defaultroute
140.174.170.1:204.156.128.1
|
define mah static IP number (140.174.170.1) an' mah gateway
(204.156.128.1). These sh'd be changed t'yer IP an' yer gateway. Eff'n
it's a dynamic PPP setup, yo' sh'd add in th' noipdefault comman', an'
yo' sh'd change it so thet th' IP numbers is all zeros (o' leave them
off). An' yo' will also probably need t'set yer netmask hyar (like
255.255.255.248 o' whutevah yer ISP give yo'), come t'reckon of it...
So then th' line sh'd read (note thet yo' kin corntinue lines wif a
backslash):
/usr/sbin/pppd connect '/usr/sbin/chat -v -f /etc/ppp/dial-tlg' \
/dev/cua1 57600 crtscts lock debug modem netmask 255.255.255.248 \
noipdefault defaultroute 0.0.0.0:0.0.0.0
|
Okay, so hyar's mah old cresty scripp:
/usr/sbin/ppp-on
#!/bin/sh
#
# ppp-on
#
# Set up the PPP link
# Last modified: 06/06/95 --Snatcher
#
#
# If there is a lock file present, then PPP
# is already running. So exit.
if [ -f /var/lock/LCK..cua1 ]
then
exit 1
fi
# Clear the log file
cat /dev/null > /var/log/ppp-log
#
# Attempt to establish link with TLG.
#
/usr/sbin/pppd connect '/usr/sbin/chat -v -f /etc/ppp/dial-tlg' \
/dev/cua1 57600 crtscts lock debug modem defaultroute \
140.174.170.1:204.156.128.1
|
This hyar one turns off PPP... ah doesn't reckon ah evah modified it:
/usr/sbin/ppp-off
#!/bin/sh
DEVICE=ppp0
#
# If the ppp0 pid file is present then the program is
# running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
kill -INT `cat /var/run/$DEVICE.pid`
#
# If unsuccessful, ensure that the pid file is removed.
#
if [ ! "$?" = "0" ]; then
echo "removing stale $DEVICE pid file."
rm -f /var/run/$DEVICE.pid
exit 1
fi
#
# Success. Terminate with proper status.
#
echo "$DEVICE link terminated"
exit 0
fi
#
# The link is not active
#
echo "$DEVICE link is not active"
exit 1
|
This hyar is th' chat scripp thet has all th' fineies in it, so yo'
sh'd probably chmod it 600.
/etc/ppp/dial-tlg
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT BUSY
"" ATZ OK ATDT14155559293 CONNECT ""
ogin:--ogin: arlingto word: mypasswd
|
One other thin' is thet yo' need t'put th' domain name sarvers thet
yer ISP gives yo' in resolve.conf t'git DNS t'wawk right. This hyar is
whut mine looks like:
/etc/resolv.conf
search truncheon.com
nameserver 206.13.28.12
nameserver 206.13.31.12
|
Eff'n yo' doesn't haf yer own domain, then eifer omit th' search line
o' change truncheon.com, as enny fool kin plainly see, t'yer ISP's
domain, as enny fool kin plainly see. Then, eff'n yer hankerin' t'keep
th' PPP link up all th' time, add the follerin' into yer crontab:
# Keep PPP connection up
*/5 * * * * root /usr/sbin/ppp-on
|
OH! Fry mah hide!! Fry mah hide! an' eff'n yer hankerin' t'be able
t'see all th' warnin' an' debuggin' messages, etc., put this hyar line
in yer /etc/syslog.conf file. Yo' might be hankerin' t'do this hyar
befo'e ennythin' else, acshully.
# make ppp-log
daemon,local2.debug /etc/ppp/ppp-log
|
An' thet is th' way yo' getcher PPP machine t'wawk. Amen, as enny fool
kin plainly see.
|