PPP Linux "server" connection

PPP Linux "server" connection

Post by Rick » Fri, 25 Sep 1998 04:00:00



     I am unable to connect to my Linux server using a dial in PPP
connection, from a Win95 machine using DUN.  I am using mgetty, which works
fine when connecting with a terminal program (i.e Hyperterminal).  But when
I try to connect using DUN, I get an "Error 691:The computer you are dialing
in to cannot establish a Dial Up Networking connection.  Check your password
and try again."
     I am using a user name and password from /etc/passwd, which from what I
know should work by setting the "login" option in ppp/options.

I have a line in /etc/mgetty+sendfax/login.config:
/AutoPPP/ -    a_ppp    /usr/sbin/ppd

My /etc/ppp/options contains:
proxyarp
kdebug
auth
login
-chap
-detach
crtscts

I have also attached a portion of sys log messages containing a ppp
connection. (Where cleopatra is the user name):

Sep 24 19:27:48 Server1 mgetty[324]: data dev=ttyS2, pid=324, caller=none,
conn='57600', name='', cmd='/usr/sbin/pppd', user='/AutoPPP/'
Sep 24 19:27:48 Server1 kernel: CSLIP: code copyright 1989 Regents of the
University of California
Sep 24 19:27:49 Server1 kernel: PPP: version 2.2.0 (dynamic channel
allocation)
Sep 24 19:27:49 Server1 kernel: PPP Dynamic channel allocation code
copyright 1995 Caldera, Inc.
Sep 24 19:27:49 Server1 kernel: PPP line discipline registered.
Sep 24 19:27:49 Server1 kernel: registered device ppp0
Sep 24 19:27:49 Server1 pppd[324]: pppd 2.2.0 started by a_ppp, uid 0
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set flags to 70000
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set flags to 70000
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set xasyncmap
Sep 24 19:27:49 Server1 pppd[324]: Using interface ppp0
Sep 24 19:27:49 Server1 pppd[324]: Connect: ppp0 <--> /dev/ttyS2
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set xmit asyncmap ffffffff
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set flags to 70000
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set mru to 5dc
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set rcv asyncmap 0
Sep 24 19:27:49 Server1 kernel: ppp_tty_ioctl: set flags to 70010
Sep 24 19:27:51 Server1 kernel: ppp: successfully queued 22 bytes, flags =
f070010
Sep 24 19:27:51 Server1 kernel: ppp_tty_ioctl: set mru to 5dc
Sep 24 19:27:51 Server1 kernel: ppp_tty_ioctl: set rcv asyncmap 0
Sep 24 19:27:51 Server1 kernel: ppp_tty_ioctl: set flags to f070000
Sep 24 19:27:52 Server1 kernel: ppp: successfully queued 30 bytes, flags =
f070000
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set xmit asyncmap a0000
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set flags to f070003
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set mru to 5dc
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set rcv asyncmap 0
Sep 24 19:27:52 Server1 kernel: ppp: successfully queued 11 bytes, flags =
f070003
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set flags to f070003
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set xmit asyncmap ffffffff
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set flags to f070000
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set mru to 5dc
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set rcv asyncmap 0
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set flags to f070010
Sep 24 19:27:52 Server1 pppd[324]: PAP authentication failure for ref
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set flags to f070010
Sep 24 19:27:52 Server1 kernel: ppp: successfully queued 6 bytes, flags =
f070010
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: get debug level 7
Sep 24 19:27:52 Server1 kernel: ppp_tty_ioctl: set flags to f000010
Sep 24 19:27:52 Server1 pppd[324]: Connection terminated.
Sep 24 19:27:52 Server1 pppd[324]: Exit.
Sep 24 19:29:48 Server1 kernel: PPP: ppp line discipline successfully
unregistered

 
 
 

PPP Linux "server" connection

Post by Rick » Fri, 25 Sep 1998 04:00:00


oops- user is ref

 
 
 

PPP Linux "server" connection

Post by Sydney Weidma » Sun, 27 Sep 1998 04:00:00


I don't know if this will help, but here is the configuration that worked for
me.

In /etc/ppp/scripts I have the following files:

chatscript
ppp-on-dialer
ppp-off

chatscript looks like this:

ABORT  BUSY
ABORT  'NO CARRIER'
REPORT  CONNECT
TIMEOUT  3
''  AT
'OK-+++\c-OK' ATH0
TIMEOUT  60
OK  ATZ0
OK 'ATZ0E1V1Q0&S0'     #  <---   Insert your modem initialization string
OK 'ATDT5551212'             #  <---  Insert your number here
CONNECT

ppp-on-dialer looks like this:

#!/bin/sh
exec chat -v -f /etc/ppp/scripts/chatscript

ppp-off looks like this:

#!/bin/sh
chat -v '' BREAK

then in /usr/sbin I have a script called mbnet (the name of my ISP) that
contains this one line:

exec pppd passive +ua /etc/ppp/pap-sec \
connect /etc/ppp/scripts/ppp-on-dialer \
disconnect /etc/ppp/scripts/ppp-off \
/dev/cua3 115200 -detach defaultroute \
user your_username debug lock modem crtscts

you will have to change /dev/cua3 to whatever port your modem is on.
passive tells the ppp daemon to try authentication and then wait for the server
to send an
LCP (not sure what that stands for). Don't use chap or auth options because
they require
the ISP to authenticate itself with your machine and most ISP's won't do this.

You are using the chap option, but the pppd fails while attempting PAP
authorization.
Setting the passive option just lets the remote end of the connection worry
about
what authentication protocol to use. As long as you have a valid pap-secrets
file listed
after the +ua argument the PAP process on the remote machine will find your
password
and stuff.

By the way, I couldn't get my password recognized until I changed the format of
my
pap-secrets file to the following:

your_username
your_password

I think the PPP-HOWTO had a different format described in it which didn't work
for me.

To terminate the connection, I have a small script called mbnet-off that looks
up the process ID of the pppd and kills it. Before pppd dies, it runs the
disconnect script, ppp-off.

mbnet-off looks like this:

#!/bin/sh
exec kill -SIGTERM $(cat /var/run/ppp0.pid)

I'm still pretty much a newbie myself, so I cannot guarantee that my setup
meets even the most minimal security or robustness standards.  All I know is
that it works for me. I welcome any comments or criticisms, tame or flame. If I
can make my setup better (and stop giving bad advice), I'll be happy.

Some things that I would like to be able to do but can't -- send feedback to
myself so that I know when I am connected. The way things are set up now, I
have to switch to a terminal where I am logged in as root and run the command
tail -f /var/log/messages
until I see the local and remote IP addresses pop up. A slight pain, but also a
source of information, as you know. I also would like to be able to report
connection speed to xwindows.

Perhaps some kind soul will suggest how I could overcome my last few obstacles.

I wish you luck and hope that your journey is a pleasant one.


>      I have a line in /etc/mgetty+sendfax/login.config:
> /AutoPPP/ -    a_ppp    /usr/sbin/ppd

> My /etc/ppp/options contains:
> proxyarp
> kdebug
> auth
> login
> -chap
> -detach
> crtscts

> I have also attached a portion of sys log messages containing a ppp
> connection. (Where cleopatra is the user name):

> Sep 24 19:27:52 Server1 pppd[324]: PAP authentication failure for ref

 
 
 

PPP Linux "server" connection

Post by donol » Sun, 27 Sep 1998 04:00:00



>     I am unable to connect to my Linux server using a dial in PPP
>connection, from a Win95 machine using DUN.  I am using mgetty, which works
>fine when connecting with a terminal program (i.e Hyperterminal).  But when
>I try to connect using DUN, I get an "Error 691:The computer you are
dialing
>in to cannot establish a Dial Up Networking connection.  Check your
password
>and try again."
>     I am using a user name and password from /etc/passwd, which from what
I
>know should work by setting the "login" option in ppp/options.

>I have a line in /etc/mgetty+sendfax/login.config:
>/AutoPPP/ -    a_ppp    /usr/sbin/ppd

>My /etc/ppp/options contains:
>proxyarp
>kdebug
>auth
>login
>-chap
>-detach
>crtscts

 A few things to check out:  Make sure that the option about only accepting
encrypted passwds is not checked in Windows.  I had that problem when I set
up one of my machines.  I don't remember if it was NT or 95 but it's worth a
look.  On the options file, are you sure that it's chap?  Also sometimes the
l is left of the login if your not sure if it's Login or login.  Actually
you can leave that options file empty but it has to exist.  I think I only
have one option in mine.  Donoli.