[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Modem Loopback Problem - a trap to be aware of



Hi All,

This is a little long but was an interesting problem.
I believe it is now fixed and will try it tonight.  I have also created a
normal shell account so that I can dial in using minicom for maintenance.

I have a dialin connection to get access from home and was having problems
when ppp was started.
Unless I had access to the dialed box logs, I would never have figured out
what the problem may have been.
It turns out that the ppp password in the pap-secrets file was different to
the login password in the passwd file.

Everything I was transmitting was being sent back to me.... see following
log
I had no idea of even what the problem might have been from the logs of
dialing box at home.

The dialed server is Debian 2.2.17 potato, the dialing PC is Debian 2.1
slink... and it used to work.

This is the log from the slink (dialing) box

Jun 30 06:01:56 lri pppd[187]: pppd 2.3.5 started by root, uid 0
Jun 30 06:01:58 lri chat[188]: timeout set to 3 seconds
Jun 30 06:01:58 lri chat[188]: abort on (\nBUSY\r)
Jun 30 06:01:58 lri chat[188]: abort on (\nNO ANSWER\r)
Jun 30 06:01:58 lri chat[188]: abort on (\rRINGING\r\n\r\nRINGING\r)
-snip-
Jun 30 06:02:18 lri chat[188]: dialin!login:
Jun 30 06:02:18 lri chat[188]:  -- got it
Jun 30 06:02:18 lri chat[188]: send (dialinuser1^M)
Jun 30 06:02:18 lri chat[188]: expect (assword:)
Jun 30 06:02:18 lri chat[188]:  dialin^M
Jun 30 06:02:18 lri chat[188]: Password:
Jun 30 06:02:18 lri chat[188]:  -- got it
Jun 30 06:02:18 lri chat[188]: send (xxxxxx^M)
Jun 30 06:02:18 lri pppd[187]: Serial connection established.
Jun 30 06:02:19 lri pppd[187]: Using interface ppp0
Jun 30 06:02:20 lri pppd[187]: Connect: ppp0 <--> /dev/ttyS0
Jun 30 06:02:20 lri pppd[187]: sent [LCP ConfReq id=0x1 <asyncmap 0x0>
<magic 0x1b1baaca> <pcomp> <accomp>]
Jun 30 06:02:20 lri pppd[187]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0>
<magic 0x1b1baaca> <pcomp> <accomp>]
Jun 30 06:02:20 lri pppd[187]: sent [LCP ConfNak id=0x1 <magic 0x9ffff829>]
Jun 30 06:02:20 lri pppd[187]: rcvd [LCP ConfNak id=0x1 <magic 0x9ffff829>]
Jun 30 06:02:20 lri pppd[187]: sent [LCP ConfReq id=0x2 <asyncmap 0x0>
<magic 0x5b389cb3> <pcomp> <accomp>]
Jun 30 06:02:20 lri pppd[187]: rcvd [LCP ConfReq id=0x2 <asyncmap 0x0>
<magic 0x5b389cb3> <pcomp> <accomp>]
Jun 30 06:02:20 lri pppd[187]: sent [LCP ConfNak id=0x2 <magic 0x5a47e268>]
-snip-
Jun 30 06:02:22 lri pppd[187]: sent [LCP ConfReq id=0xa <asyncmap 0x0>
<magic 0xd1e14651> <pcomp> <accomp>]
Jun 30 06:02:22 lri pppd[187]: rcvd [LCP ConfReq id=0xa <asyncmap 0x0>
<magic 0xd1e14651> <pcomp> <accomp>]
Jun 30 06:02:22 lri pppd[187]: sent [LCP ConfNak id=0xa <magic 0x4ad434f0>]
Jun 30 06:02:22 lri pppd[187]: rcvd [LCP ConfNak id=0xa <magic 0x4ad434f0>]
Jun 30 06:02:22 lri pppd[187]: Serial line is looped back.
Jun 30 06:02:22 lri pppd[187]: sent [LCP TermReq id=0xb "Loopback detected"]
Jun 30 06:02:22 lri pppd[187]: rcvd [LCP TermReq id=0xb "Loopback detected"]
Jun 30 06:02:22 lri pppd[187]: sent [LCP TermAck id=0xb]
Jun 30 06:02:22 lri pppd[187]: rcvd [LCP TermAck id=0xb]
Jun 30 06:02:22 lri pppd[187]: Connection terminated.
Jun 30 06:02:23 lri pppd[187]: Hangup (SIGHUP)
Jun 30 06:02:23 lri pppd[187]: Exit.

At this point it was PANIC.  What the hell is a "Loopback"... dud modem ?
No, others can get in on their windows machines.
(and I really must fix the clock in this machine !!!)



In the dialin box (potato), the password file was set up as follows (note
that there was no entry for dialinuser2):
dialinuser1:x:1001:1001:Dialin Account,,,:/home/dialinuser1:/usr/sbin/pppd

This has a password of yyyyyy, and was the system used when the server was
running slackware to start pppd and not give a shell (in an attempt to keep
fiddling fingers away from the system).

The pap-secrets file had entries of:
dialinuser1          *       xxxxxx        *
dialinuser2	         *       zzzzzz        *

It turns out that password xxxxxx was different to password yyyyyy, and I
was sending password xxxxxx.
The account for dialinuser2 works fine (at least from a windows machine)

And the auth.log
Jul  3 21:21:46 dialin PAM_unix[2457]: authentication failure;
LOGIN(uid=0) -> dialinuser1 for login service
Jul  3 21:21:49 dialin login[2457]: FAILED LOGIN (1) on `ttyS1' FOR
`dialinuser1', Authentication failure

Bingo !!!  Somewhere to look for a problem.

Ian














Reply to: