Hi,
I'm finding that about half the time, seemingly at random, I can't get a
connection to my ISP. Some days it's fine, some days it's inconsistent,
some days it takes so many calls to get a connection that I just give
up. The ISP uses PAP, but I've determined through my logs and through
minicom sessions that when things aren't working, for no apparent
reason, I get a shell account login prompt instead, in which case I
never get PAP authenticated and chat & pppd eventually give up. (I don't
have a shell account at the ISP!)
I've written to the ISP, but all they will tell me is "you need to make
sure you are using PAP in order to log in successfully. try forcing pppd
to use PAP."
I don't understand how to do this. I've gone through the PPP-HOWTO, the
pppd FAQ, man pppd, and man chat. I've seen occasional mention of
situations like this, with no instructions on how to deal with it.
I promise to post a summary of anything that works. Please help!
I already tried adding the "require-pap" option to /etc/ppp/options,
but that's not what's needed: it makes it impossible to connect. From
the pppd manpage,
require-pap
Require the peer to authenticate itself using PAP
^^^^
[Password Authentication Protocol] authentication.
And from the example scripts provided with pppd:
# This requires TWO WAY authentication - do NOT use this for a
standard
# PAP authenticated link to an ISP as this will require the ISP
machine
# to authenticate itself to your machine (and it will not be able to).
require-chap
So all that does is try to get my ISP to authenticate itself to my
machine, which it cannot do. I want the opposite: to force the ISP to
request MY machine to authenticate using PAP. Is there a way I can do
that?
I'm experimenting with a few things, but so far nothing seems to
produce consistent results. Today I'm connecting OK pretty often, but
I still sometimes get the shell login stuff.
Following are two log files: one from a failed connection, one from a
successful connection. You can see that in the failed connection, it
gets to the point where I would expect to see "garbage" from ppp
(starting with a tilde), but instead I get: "Annex Command Line
Interpreter * Copyright (C) 1988, 1996 Xylogics, Inc."
When that happens, ppp never seems to start on the server, so chat
doesn't exit on my system, and no ppp connection ever gets made.
Here's the log from a failed connection. (Produced by giving pppd the
"debug" option, and chat the "-v" flag.)
(Sorry this is a long message. I thought it best to include as much
information as possible. At the end I've included my /etc/ppp/options
and chat scripts.)
Jul 19 00:18:41 slink chat[516]: timeout set to 10 seconds
Jul 19 00:18:41 slink chat[516]: expect (OK)
Jul 19 00:18:41 slink chat[516]: ^M
Jul 19 00:18:41 slink chat[516]: AT&F2S7=45S0=0L1V1&c1E1Q0^M^M
Jul 19 00:18:41 slink chat[516]: OK
Jul 19 00:18:41 slink chat[516]: -- got it
Jul 19 00:18:41 slink chat[516]: send (ATDT3390138^M)
Jul 19 00:18:41 slink chat[516]: timeout set to 60 seconds
Jul 19 00:18:41 slink chat[516]: expect (CONNECT)
Jul 19 00:18:41 slink chat[516]: ^M
Jul 19 00:18:58 slink chat[516]: ^MATDT3390138^M^M
Jul 19 00:18:58 slink chat[516]: CONNECT
Jul 19 00:18:58 slink chat[516]: -- got it
Jul 19 00:18:58 slink chat[516]: send (^M)
Jul 19 00:18:58 slink chat[516]: expect (~)
Jul 19 00:18:58 slink chat[516]: 38400^M
Jul 19 00:19:02 slink chat[516]: ^M
Jul 19 00:19:02 slink chat[516]: ^M
Jul 19 00:19:02 slink chat[516]: Annex Command Line Interpreter *
Copyright (C) 1988, 1996 Xylogics, Inc.^M
Jul 19 00:19:02 slink chat[516]: ^M
Jul 19 00:19:02 slink chat[516]:
ULSTERNet
Jul 19 00:19:02 slink chat[516]: 1) Log onto Shell
account and new BBS
Jul 19 00:19:02 slink chat[516]: 2) Exit -
Hangup
Jul 19 00:19:02 slink chat[516]:
Jul 19 00:19:02 slink chat[516]: ^[[1mEnter command: ^[[m
Jul 19 00:19:58 slink chat[516]: alarm
Jul 19 00:19:58 slink chat[516]: send (\K)
Jul 19 00:19:58 slink chat[516]: expect (~)
Jul 19 00:19:59 slink chat[516]:
ULSTERNet
Jul 19 00:19:59 slink chat[516]: 1) Log onto Shell
account and new BBS
Jul 19 00:19:59 slink chat[516]: 2) Exit -
Hangup
Jul 19 00:19:59 slink chat[516]:
Jul 19 00:19:59 slink chat[516]: ^[[1mEnter command: ^[[m
Jul 19 00:20:58 slink chat[516]: alarm
Jul 19 00:20:58 slink pppd[513]: Connect script failed
Jul 19 00:20:58 slink chat[516]: Failed
Jul 19 00:20:59 slink pppd[513]: Exit.
#######################################################
For comparison, here is a log from a successful ppp session:
Jul 19 00:26:12 slink pppd[562]: pppd 2.3.5 started by root, uid 0
Jul 19 00:26:13 slink chat[565]: report (CONNECT)
Jul 19 00:26:13 slink chat[565]: abort on (NO\sDIALTONE)
Jul 19 00:26:13 slink chat[565]: abort on (BUSY)
Jul 19 00:26:13 slink chat[565]: abort on (NO\sANSWER)
Jul 19 00:26:13 slink chat[565]: send (^MAT^M)
Jul 19 00:26:13 slink chat[565]: expect (OK)
Jul 19 00:26:13 slink chat[565]: ^MAT^M^M
Jul 19 00:26:13 slink chat[565]: OK
Jul 19 00:26:13 slink chat[565]: -- got it
Jul 19 00:26:13 slink chat[565]: send (ATH0^M)
Jul 19 00:26:13 slink chat[565]: timeout set to 10 seconds
Jul 19 00:26:13 slink chat[565]: expect (OK)
Jul 19 00:26:13 slink chat[565]: ^M
Jul 19 00:26:13 slink chat[565]: ATH0^M^M
Jul 19 00:26:13 slink chat[565]: OK
Jul 19 00:26:13 slink chat[565]: -- got it
Jul 19 00:26:13 slink chat[565]: send (AT&F2S7=45S0=0L1V1&c1E1Q0^M^M)
Jul 19 00:26:14 slink chat[565]: timeout set to 10 seconds
Jul 19 00:26:14 slink chat[565]: expect (OK)
Jul 19 00:26:14 slink chat[565]: ^M
Jul 19 00:26:14 slink chat[565]: AT&F2S7=45S0=0L1V1&c1E1Q0^M^M
Jul 19 00:26:14 slink chat[565]: OK
Jul 19 00:26:14 slink chat[565]: -- got it
Jul 19 00:26:14 slink chat[565]: send (ATDT3390138^M)
Jul 19 00:26:14 slink chat[565]: timeout set to 60 seconds
Jul 19 00:26:14 slink chat[565]: expect (CONNECT)
Jul 19 00:26:14 slink chat[565]: ^M
Jul 19 00:26:31 slink chat[565]: ^MATDT3390138^M^M
Jul 19 00:26:31 slink chat[565]: CONNECT
Jul 19 00:26:31 slink chat[565]: -- got it
Jul 19 00:26:31 slink chat[565]: send (^M)
Jul 19 00:26:31 slink chat[565]: expect (~)
Jul 19 00:26:31 slink chat[565]: 38400^M
Jul 19 00:26:32 slink chat[565]: ~
Jul 19 00:26:32 slink chat[565]: -- got it
Jul 19 00:26:32 slink chat[565]: send (^M)
Jul 19 00:26:32 slink pppd[562]: Serial connection established.
Jul 19 00:26:33 slink pppd[562]: Using interface ppp0
Jul 19 00:26:33 slink pppd[562]: Connect: ppp0 <--> /dev/ttyS1
Jul 19 00:26:33 slink pppd[562]: sent [LCP ConfReq id=0x1 <asyncmap 0x0>
<magic 0xbe75febd> <pcomp> <accomp>]
Jul 19 00:26:33 slink pppd[562]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0>
<magic 0xbe75febd> <pcomp> <accomp>]
Jul 19 00:26:35 slink pppd[562]: rcvd [LCP ConfReq id=0x2 <asyncmap 0x0>
<auth pap> <magic 0xfe48127> <pcomp> <accomp>]
Jul 19 00:26:35 slink pppd[562]: sent [LCP ConfAck id=0x2 <asyncmap 0x0>
<auth pap> <magic 0xfe48127> <pcomp> <accomp>]
Jul 19 00:26:35 slink pppd[562]: sent [PAP AuthReq id=0x1 user="*******"
password="********"]
Jul 19 00:26:38 slink pppd[562]: sent [PAP AuthReq id=0x2 user="*******"
password="********"]
Jul 19 00:26:38 slink pppd[562]: rcvd [PAP AuthAck id=0x2 ""]
Jul 19 00:26:38 slink pppd[562]: Remote message:
Jul 19 00:26:38 slink pppd[562]: sent [IPCP ConfReq id=0x1 <addr
0.0.0.0> <compress VJ 0f 01>]
Jul 19 00:26:39 slink pppd[562]: rcvd [IPCP ConfReq id=0x3 <compress VJ
0f 01> <addr 208.148.73.3>]
Jul 19 00:26:39 slink pppd[562]: sent [IPCP ConfAck id=0x3 <compress VJ
0f 01> <addr 208.148.73.3>]
Jul 19 00:26:42 slink pppd[562]: sent [IPCP ConfReq id=0x1 <addr
0.0.0.0> <compress VJ 0f 01>]
Jul 19 00:26:42 slink pppd[562]: rcvd [IPCP ConfNak id=0x1 <addr
208.133.193.43>]
Jul 19 00:26:42 slink pppd[562]: sent [IPCP ConfReq id=0x2 <addr
208.133.193.43> <compress VJ 0f 01>]
Jul 19 00:26:42 slink pppd[562]: rcvd [IPCP ConfAck id=0x2 <addr
208.133.193.43> <compress VJ 0f 01>]
Jul 19 00:26:42 slink pppd[562]: local IP address 208.133.193.43
Jul 19 00:26:42 slink pppd[562]: remote IP address 208.148.73.3
####################################################################
Following are the relevant config files. I run these scripts with this
command:
pppd call ulsternet1
(or: pppd call ulsternet2)
##############################
# Filename: /etc/ppp/options
debug
crtscts
asyncmap 0
modem
defaultroute
/dev/ttyS1
0.0.0.0:0.0.0.0
noipdefault
ipcp-accept-remote
ipcp-accept-local
auth
# is ppp slow to start on remote machine? Try this. HOWTO suggests 30.
lcp-max-configure 60
# must give name for PAP or CHAP to work.
name abigoo
# End of file.
#####################
# Here is my /etc/ppp/pap-secrets (well, sort of.)
# Secrets for authentication using PAP
# client server secret IP addresses
<USERNAME> * <PASSWORD> *
# End of file.
########################################################
# Here is my main chatscript.
# Filename: /etc/ppp/chat-ulsternet
ECHO OFF
REPORT CONNECT
ABORT NO\sDIALTONE
ABORT BUSY
ABORT NO\sANSWER
'' \rAT
'OK-+++\c-OK' ATH0
TIMEOUT 10
SAY 'Modem initialization.\n'
OK AT&F2S7=45S0=0L1V1&c1E1Q0^M
# dialing Ulsternet.
TIMEOUT 10
SAY 'Dialing Ulsternet.\n'
# \T gets number from -T flag to chat.
OK ATDT\T
TIMEOUT 60
CONNECT ""
SAY 'Connected, trying to log in.\n'
#
# From the PPP howto:
# "When your chat script completes, pppd starts on your PC. However, if
# you have not completed the log in process to the server (including
#
...
read more »