223 lines
7.5 KiB
HTML
223 lines
7.5 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<title>PAP HOWTO LG #38</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H1><font color="maroon">PAP HOWTO</font></H1>
|
|
<H4>By <a href="mailto:catfish@alltel.net">Terry Martin</a></H4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<P>
|
|
This Document is covered by the GPL and can be used in anyway seen fit from
|
|
the license.
|
|
<P>
|
|
This document is not intended to replace the ppp-howto it is intended to be
|
|
a primer as howto setup PAP for calling an ISP that refuses tech support
|
|
to a Linux user.
|
|
<P>
|
|
PAP=Password Authentication Protocol.
|
|
<P>
|
|
If your not sure if your ISP uses pap just bring minicom up and
|
|
atdt<isp-number> and wait for the modem to connect.
|
|
<P>
|
|
If you get login: or some variant of that your isp is not using pap and this
|
|
paper is not for you.
|
|
<P>
|
|
If you get a line or two of trash like:
|
|
<PRE>
|
|
{}{}{}{}{}}}}{{}{}}}{}{}{}{}[][][][][
|
|
</PRE>
|
|
You know it's looking for PAP or mschap.
|
|
<P>
|
|
I won't deal with MSChap since I don't have access to an ISP that uses
|
|
it and I wouldn't want to knowing the reliability of NT.
|
|
Now assuming your dealing with chap we need to figure out what version
|
|
of pppd your using. Type /usr/sbin/pppd --version and you will get the
|
|
version number, I'll cover versions 2.2.0-f and 2.3.5 in this doc as
|
|
thats what I'm familiar with.
|
|
|
|
<H3>pppd 2.2.0 version.</H3>
|
|
<P>
|
|
This section I will cover the setup and impletation of pap with older
|
|
distributions like RH 4.2 and Slackware 3.6 use this older version of the
|
|
pppd daemon.
|
|
<P>
|
|
I prefer pico for the new users as editors of choice for console. If you don't
|
|
have it look into getting the latest Pine release it's part of it.
|
|
<P>
|
|
You have to edit your ppp-on script if you have one if not I'll include
|
|
one here. You need to look into /usr/doc/pppd*/scripts for the ppp scripts,
|
|
at least thats where the defaults reside with RedHat.
|
|
<P>
|
|
Here's what my ppp-on looks like:<BR>
|
|
<P>
|
|
This is setup for your modem being on com2 in dos or /dev/ttyS1 in Linux.
|
|
You need to use ttySxx since the /dev/cua1 is now a defunct format with the
|
|
2.2.x kernels. If you plan to upgrade to kernel 2.2.x you need upgrade your
|
|
pppd to at least pppd-2.3.x to keep ppp working.
|
|
<PRE>
|
|
#!/bin/sh
|
|
TELEPHONE=<your-isp-phonenumber>
|
|
|
|
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
|
|
|
|
export TELEPHONE
|
|
|
|
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
|
|
|
|
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS1 115200 \
|
|
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
|
|
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT \
|
|
+ua /etc/ppp/pap-secret
|
|
</PRE>
|
|
Thats what your ppp-on file will need to make pap work.
|
|
As you can see your login name and password are no longer included in this
|
|
file so that closes a security risk there.
|
|
<P>
|
|
Anyplace you see <name> always omit the < > and just use the
|
|
information needed.
|
|
<P>
|
|
Next you need to edit /etc/ppp/ppp-on-dialer to disable the looking for a
|
|
login and password lines.
|
|
<P>
|
|
Example:
|
|
<PRE>
|
|
#!/bin/sh
|
|
#
|
|
# This is part 2 of the ppp-on script. It will perform the connection
|
|
# protocol for the desired connection.
|
|
#
|
|
# This is the ppp-on-dialer for PAP with pppd-2.2.0
|
|
exec /usr/sbin/chat -v \
|
|
TIMEOUT 3 \
|
|
ABORT '\nBUSY\r' \
|
|
ABORT '\nNO ANSWER\r' \
|
|
ABORT '\nRINGING\r\n\r\nRINGING\r' \
|
|
'' \rAT \
|
|
'OK-+++\c-OK' ATH0 \
|
|
TIMEOUT 30 \
|
|
OK ATDT$TELEPHONE \
|
|
CONNECT '' \
|
|
|
|
</PRE>
|
|
Now we'll cover the password file setup and format.
|
|
This next part is easy all you need is a file named pap-secret
|
|
with the login name and password on separate lines.
|
|
<P>
|
|
i.e., pap-secret with pppd-2.2.0
|
|
<PRE>
|
|
greg
|
|
stinky1
|
|
</PRE>
|
|
After you make this file if it's not there. As root type
|
|
<PRE>
|
|
chmod -r pap-secret
|
|
</PRE>
|
|
Please don't forget the /etc/resolv.conf file for your DNS numbers.
|
|
<P>
|
|
I know I said this wasn't goin to be a ppp-howto but I'll include
|
|
/etc/resolv.conf just to save headaches and email as to why it don't it work.
|
|
<PRE>
|
|
domain <your.isp.com>
|
|
search <your.isp.com>
|
|
nameserver xxx.xxx.xxx.xxx
|
|
nameserver xxx.xxx.xxx.xxx
|
|
</PRE>
|
|
Your /etc/resolv.conf should look something like this with the proper
|
|
information edited.
|
|
<P>
|
|
Put the ppp-on in /usr/sbin/ and put ppp-on-dialer in /etc/ppp with pap-secret
|
|
as root
|
|
<PRE>
|
|
cp ppp-on /usr/sbin/
|
|
cp ppp-on-dialer /etc/ppp
|
|
cp pap-secret /etc/ppp
|
|
</PRE>
|
|
Now all you should have to do is type ppp-on and you should get connected
|
|
to the net with Linux. Enjoy.
|
|
<P>
|
|
<H3>pppd-2.3.5</H3>
|
|
<P>
|
|
Seting up PAP with pppd-2.3.5 is as easy as pppd-2.2.0 just the syntax
|
|
has changed in the ppp-on script.
|
|
Please refer to the ppp-on-dialerand the resolv.conf in the above for it
|
|
so I don't have to repeat myself here.
|
|
<P>
|
|
Heres an example ppp-on script.
|
|
<PRE>
|
|
#!/bin/sh
|
|
|
|
TELEPHONE=<you-isp-phone-number>
|
|
|
|
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
|
|
|
|
export TELEPHONE
|
|
|
|
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
|
|
|
|
exec /usr/sbin/pppd debug lock modem crtscts /dev/cua1 115200 \
|
|
asyncmap 20A0000 escape FF kdebug 0 name catfish $LOCAL_IP:$REMOTE_IP \
|
|
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT \
|
|
</PRE>
|
|
Thats about all there is to it for ppp-on with pppd-2.3.5 and PAP.
|
|
<P>
|
|
Now for the /etc/pap-secret file the syntax here has changed from the
|
|
earlier pppd-2.2.0 also.
|
|
<P>
|
|
All you need here now is a single line with your login name the interface
|
|
and your password.
|
|
<P>
|
|
So your pap-scret file would look like so.
|
|
<P>
|
|
I.E. pap-secret
|
|
<PRE>
|
|
<loginname> ppp0 <password>
|
|
</PRE>
|
|
Well thats all there is to it for the PAP howto, pretty basic stuff when
|
|
theres documents for it.
|
|
<P>
|
|
Enjoy and happy surfing.
|
|
Terry Martin aka catfish on newnet #alt.linux
|
|
catfish@alltel.net
|
|
<P>
|
|
If for some reason you can't get it to work or you find an error please
|
|
email me.
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<center><H5>Copyright © 1999, Terry Martin <BR>
|
|
Published in Issue 38 of <i>Linux Gazette</i>, March 1999</H5></center>
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="./jenkins7.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./adler1.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
<!--startcut ==========================================================-->
|
|
</BODY>
|
|
</HTML>
|
|
<!--endcut ============================================================-->
|