You need the following information about the ``far end'' of your connection (ie from your Internet Service Provider - ISP) :
You also need to know how your ISP's system prompts you for your username and password. The simplest way to find this out is to dial in using Minicom, capture the entire log in process to a file and print this out.
(This is also useful as it checks the modem configuration and serial port set up - make sure that your modem's ``stored'' configuration works fine for connecting to your ISP).
Make sure you have installed the PPP daemon (all RedHat precompiled kernels support PPP). To check this, login as root and type
rpm -qa | grep ppp
Your RedHat system should respond with something like
ppp-2.1.2d-2 (for a Linux 1.2.13 kernel)
ppp-2.2.... (for a Linux 1.3.x kernel)
If you do NOT have the PPP daemon installed, do this now.
Make sure you are logged in as root.
The file /usr/sbin/ppp-on is a script for you to edit. When you have
finished editing it, running this script will connecct your machine to
your ISP.
cp /usr/sbin/ppp-on /usr/sbin/ppp-<your ISP name>
where <your ISP name> is something you remember and easy to type!
/usr/sbin/ppp-<your ISP name>
LOCKDIR=/var/spool/lock
and change it to
LOCKDIR=/var/lock
DEVICE=com1
and change it to read cua0 (DOS com1:), cua1 (DOS com2:) etc -
the serial port on which you have your modem. If your modem is on
DOS com2:, the line should read.
DEVICE=cua1
PHONE=4511234
USER=Pkarl
PASSWORD=password
OUR_IP_ADDR=137.175.6.3
and change them so that they are the phone number, user name,
password and IP number you must use to dial and log into your ISP.
Remember - most ISP's are using Unix based machines (such as
Linux), so you MUST get the upper/lower case RIGHT!
If your ISP is giving you a "temporary" (dynamic) IP number each
time you dial in, use the "dummy" IP number of 0.0.0.0
stty 19200 -tostop
and change it to
stty 38400 -tostop
if chat -l LCK..$DEVICE ABORT "NO CARRIER" ABORT BUSY "" \
ATZ OK ATs50=255s111=0DT$PHONE CONNECT "" \
ogin: $USER ssword: \\q$PASSWORD
(NB This is ALL ONE LINE - but broken here with '\' for readability.
It MUST be all one line in your script - and the spaces before the
'\' are important!)
Change this line to read
if chat -l LCK..$DEVICE ABORT "NO CARRIER" ABORT BUSY "" \
ATZ OK ATDT$PHONE CONNECT "" \
ogin: $USER ssword: \\q$PASSWORD
Now - if your ISP's system uses prompts other than ``...ogin:'' to
ask for your user name and ``...assword:'' to ask for your
password, you must change these two elements to reflect the
prompts your system sees.
pppd asyncmap 0 -detach modem crtscts mru 1500 $OUR_IP_ADDR: \
/dev/$DEVICE
(Again, this must all be on one line - but for readability it is
broken at '\'). Change this by adding the defaultroute option.
pppd asyncmap 0 -detach modem crtscts defaultroute mru 1500 \
$OUR_IP_ADDR: /dev/$DEVICE
chat and pppd.
/etc/resolv.conf and add the IP
number(s)
of your IPS's name servers. Your /etc/resolv.conf should look like
domain <your ISP's domain name>
nameserver XX.XX.XX.XX
Where <your ISP's domain name> is something like
redhat.com
and the XX.XX.XX.XX is the IP number for the domain name server you
obtained from your ISP. (If your ISP gave you more than one IP number,
that's fine, out them all in, each one on a separate line, preceded by
the key word nameserver).
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter