Re: PPP scripting on linux PDA - PPP

This is a discussion on Re: PPP scripting on linux PDA - PPP ; Vicky writes: > passive Why "passive"? > ipcp-accept-local > ipcp-accept-remote "noipdefault" might be better than this pair. > And chap-secrets contains: > # Secrets for authentication using CHAP > # client server secret IP addr > "myusername" * "mypassword" [...] ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Re: PPP scripting on linux PDA

  1. Re: PPP scripting on linux PDA

    Vicky writes:
    > passive


    Why "passive"?

    > ipcp-accept-local
    > ipcp-accept-remote


    "noipdefault" might be better than this pair.

    > And chap-secrets contains:
    > # Secrets for authentication using CHAP
    > # client server secret IP addr
    > "myusername" * "mypassword"

    [...]
    > When I execute pppd using the following:
    > /usr/sbin/pppd -d connect "/usr/sbin/chat -v -f /etc/ppp/chatscript.isp" user 'myusername' /dev/modem 38400 -detach > /var/log/pppdoutput


    You didn't mention which version of pppd you have, but the problem
    here appears to be some sort of authentication misconfiguration.

    > rcvd [LCP ConfReq id=0x3 > 49 50>]


    The peer asks for authentication.

    > sent [LCP ConfRej id=0x3 ]


    You flat-out refuse to identify yourself. This usually means that the
    "user" option is missing, the name specified doesn't match the one
    used in the /etc/ppp/chap-secrets file, or there are unescaped special
    characters in the username.

    --
    James Carlson, Solaris Networking
    Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

  2. Re: PPP scripting on linux PDA

    On Mon, 07 Jul 2003 13:20:31 +0000, James Carlson wrote:

    > Vicky writes:
    >> passive

    >
    > Why "passive"?
    >
    >> ipcp-accept-local
    >> ipcp-accept-remote

    >
    > "noipdefault" might be better than this pair.


    These are suggested by my ISP

    >
    >> And chap-secrets contains:
    >> # Secrets for authentication using CHAP # client server secret IP addr
    >> "myusername" * "mypassword"

    > [...]
    >> When I execute pppd using the following: /usr/sbin/pppd -d connect
    >> "/usr/sbin/chat -v -f /etc/ppp/chatscript.isp" user 'myusername'
    >> /dev/modem 38400 -detach > /var/log/pppdoutput

    >
    > You didn't mention which version of pppd you have, but the problem here
    > appears to be some sort of authentication misconfiguration.


    I am using pppd version 2.4.1 as supplied in my PDA.

    >
    >> rcvd [LCP ConfReq id=0x3 >> 0x8b979915> >> 49 50>]

    >
    > The peer asks for authentication.
    >
    >> sent [LCP ConfRej id=0x3 ]

    >
    > You flat-out refuse to identify yourself. This usually means that the
    > "user" option is missing, the name specified doesn't match the one used
    > in the /etc/ppp/chap-secrets file, or there are unescaped special
    > characters in the username.
    >


    Should the "user" go in the options file as:
    name myusername

    Also, when I execute pppd with the above, should single quotes
    'myusername' or double quotes "myusername" be used?

    Vicky

    --
    Anti-spam: Remove xxx from email address before replying

  3. Re: PPP scripting on linux PDA

    Vicky writes:
    > Should the "user" go in the options file as:
    > name myusername


    No. The "name" option is used if *you* are the ISP -- it's the
    authenticator's name.

    As long as your system is the one connecting into the ISP -- and thus
    is just the authenticatee ("client") -- the right one is the "user"
    option, and it doesn't matter whether it goes on the command line or
    in one of the options files. (I would suggest using
    /etc/ppp/peers/ just because it's simple.)

    > Also, when I execute pppd with the above, should single quotes
    > 'myusername' or double quotes "myusername" be used?


    That's a function of your shell and has nothing to do with pppd.
    Typical user names don't require any escaping or quoting at all, but I
    don't know what user name you're using. ("myusername" seems unlikely ...)

    --
    James Carlson, Solaris Networking
    Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

  4. Re: PPP scripting on linux PDA

    On Mon, 07 Jul 2003 18:46:20 +0000, James Carlson wrote:

    I modified the files slightly so that the structure included:
    /etc/ppp/chap-secrets
    /etc/ppp/chat-uklinux
    /etc/ppp/options
    /etc/ppp/peers/uklinux

    where the contents of chap-secrets is:
    # Secrets for authentication using CHAP
    # client server secret IP addr
    myusername * mypassword

    chat-uklinux contains:
    ABORT "NO CARRIER"
    ABORT "ERROR"
    ABORT "NO DIALTONE"
    ABORT "BUSY"
    ABORT "NO ANSWER"
    ""
    ATZ
    OK
    ATDT08456042086
    CONNECT
    ""

    options contains:
    noauth
    lock
    passive
    ipcp-accept-local
    ipcp-accept-remote
    defaultroute
    usepeerdns
    mtu 576
    mru 576

    and peers/uklinux contains:
    #device and line speed
    /dev/modem 38400
    #user name for authentication
    user vbyford
    #chat script to bring up connection
    connect '/usr/sbin/chat -v -f /etc/ppp/chat-uklinux'
    #turn on pppd debug messages to syslogd
    debug
    -detach

    after running:
    /usr/sbin/pppd call uklinux > /var/log/pppdoutput

    the outout file showed the following:
    Serial connection established.
    using channel 3
    Using interface ppp0
    Connect: ppp0 <--> /dev/modem
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    Modem hangup
    Connection terminated.

    I feel that this is getting closer to logging on, but do not know what
    needs to be done next.

    Vicky

    ---
    Anti-spam: Remove xxx from email address before replying

  5. Re: PPP scripting on linux PDA

    On Tue, 08 Jul 2003 17:34:20 +0000, James Carlson wrote:

    > Vicky writes:
    >> where the contents of chap-secrets is: # Secrets for authentication
    >> using CHAP # client server secret IP addr myusername *
    >> mypassword

    > ^^^^^^^^^^


    This was a typo in this message. myusername is vbyford in chap-secrets

    >> and peers/uklinux contains:
    >> #device and line speed
    >> /dev/modem 38400
    >> #user name for authentication
    >> user vbyford

    > ^^^^^^^
    >
    > Unless that chap-secrets file is obscured in some way, those two still
    > don't appear to match. The name really does need to be the same.
    >
    >> Connect: ppp0 <--> /dev/modem
    >> sent [LCP ConfReq id=0x1
    >> ] sent [LCP ConfReq id=0x1
    >> ]

    >
    > That's what happens when either the dialing script fails or the peer
    > isn't running PPP at all.
    >
    > Rather than piping the output of pppd around, it might be good to read
    > up on /etc/syslog.conf and get your debug output that way. The 'chat'
    > utility logs to facility "local2" and the pppd program logs to facility
    > "daemon."
    >

    I set up a syslog.conf with the following entries:
    # chat logging
    local2.* -/var/log/chat.err
    # pppd logging
    daemon.* -/var/log/pppd.err

    But when running syslogd and executing
    /usr/sbin/pppd call uklinux
    only a /var/log/messages file is created. The debug information for chat and pppd put in this file
    showed:

    Jul 8 20:39:13 openzaurus daemon.notice pppd[516]: pppd 2.4.1 started by root, uid 0
    Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (NO CARRIER)
    Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (ERROR)
    Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (NO DIALTONE)
    Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (BUSY)
    Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (NO ANSWER)
    Jul 8 20:39:14 openzaurus local2.info chat[518]: send (ATZ^M)
    Jul 8 20:39:14 openzaurus local2.info chat[518]: expect (OK)
    Jul 8 20:39:14 openzaurus local2.info chat[518]: ATZ^M^M
    Jul 8 20:39:14 openzaurus local2.info chat[518]: OK
    Jul 8 20:39:14 openzaurus local2.info chat[518]: -- got it
    Jul 8 20:39:14 openzaurus local2.info chat[518]: send (ATDT08456042086^M)
    Jul 8 20:39:15 openzaurus local2.info chat[518]: expect (CONNECT)
    Jul 8 20:39:15 openzaurus local2.info chat[518]: ^M
    Jul 8 20:39:39 openzaurus local2.info chat[518]: ATDT08456042086^M^M
    Jul 8 20:39:39 openzaurus local2.info chat[518]: CONNECT
    Jul 8 20:39:39 openzaurus local2.info chat[518]: -- got it
    Jul 8 20:39:39 openzaurus local2.info chat[518]: send (^M)
    Jul 8 20:39:39 openzaurus daemon.info pppd[516]: Serial connection established.
    Jul 8 20:39:39 openzaurus daemon.debug pppd[516]: using channel 2
    Jul 8 20:39:39 openzaurus daemon.info pppd[516]: Using interface ppp0
    Jul 8 20:39:39 openzaurus daemon.info pppd[516]: Connect: ppp0 -> /dev/modem
    Jul 8 19:39:39 openzaurus user.notice /etc/hotplug/net.agent: assuming ppp0 is already up
    Jul 8 20:39:40 openzaurus user.notice pppd[516]: sent [LCP ConfReq id=0x1 ru 576> syncmap 0x0> agic 0xa567ad12> comp> ccomp>]
    Jul 8 20:39:43 openzaurus user.notice pppd[516]: sent [LCP ConfReq id=0x1 ru 576> syncmap 0x0> agic 0xa567ad12> comp> ccomp>]
    Jul 8 20:39:46 openzaurus user.notice pppd[516]: sent [LCP ConfReq id=0x1 ru 576> syncmap 0x0> agic 0xa567ad12> comp> ccomp>]
    Jul 8 20:39:49 openzaurus user.notice pppd[516]: sent [LCP ConfReq id=0x1 ru 576> syncmap 0x0> agic 0xa567ad12> comp> ccomp>]
    Jul 8 20:39:52 openzaurus user.notice pppd[516]: sent [LCP ConfReq id=0x1 ru 576> syncmap 0x0> agic 0xa567ad12> comp> ccomp>]
    Jul 8 20:39:55 openzaurus user.notice pppd[516]: sent [LCP ConfReq id=0x1 ru 576> syncmap 0x0> agic 0xa567ad12> comp> ccomp>]
    Jul 8 20:39:56 openzaurus daemon.notice pppd[516]: Modem hangup
    Jul 8 20:39:56 openzaurus daemon.notice pppd[516]: Connection terminated.
    Jul 8 19:39:56 openzaurus user.notice /etc/hotplug/net.agent: unregister event not handled
    Jul 8 20:39:57 openzaurus daemon.info pppd[516]: Exit.

    Does this make anymore sense?

    Thanks

    Vicky

    --
    Anti-spam: Remove xxx from email address before replying

  6. Re: PPP scripting on linux PDA

    Vicky wrote:

    > I set up a syslog.conf with the following entries:
    > # chat logging
    > local2.* -/var/log/chat.err
    > # pppd logging
    > daemon.* -/var/log/pppd.err


    > But when running syslogd and executing
    > /usr/sbin/pppd call uklinux
    > only a /var/log/messages file is created. The debug information for
    > chat and pppd put in this file


    You likely forgot to send a SIGHUP to syslogd to cause it to reread
    syslog.conf so it knows about the new entries.

    > showed:


    > Jul 8 20:39:13 openzaurus daemon.notice pppd[516]: pppd 2.4.1 started
    > by root, uid 0
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (NO CARRIER)
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (ERROR)
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (NO DIALTONE)
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (BUSY)
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: abort on (NO ANSWER)
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: send (ATZ^M)
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: expect (OK)
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: ATZ^M^M
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: OK
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: -- got it
    > Jul 8 20:39:14 openzaurus local2.info chat[518]: send (ATDT08456042086^M)
    > Jul 8 20:39:15 openzaurus local2.info chat[518]: expect (CONNECT)
    > Jul 8 20:39:15 openzaurus local2.info chat[518]: ^M
    > Jul 8 20:39:39 openzaurus local2.info chat[518]: ATDT08456042086^M^M
    > Jul 8 20:39:39 openzaurus local2.info chat[518]: CONNECT
    > Jul 8 20:39:39 openzaurus local2.info chat[518]: -- got it
    > Jul 8 20:39:39 openzaurus local2.info chat[518]: send (^M)

    ^^
    The ^M is a carriage-return sent as a result of changing the chat
    script to end with "". This could explain why the other side of
    the connection doesn't appear to speak PPP. Remove the "" or
    replace the quotes with '\c'.

    Try again.

    --
    Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    PPP-Q&A links, downloads: http://ckite.no-ip.net/
    /* For every credibility gap, there is a gullibility fill.
    -- R. Clopton */

  7. Re: PPP scripting on linux PDA

    Clifford Kite writes:
    > Vicky wrote:
    >
    > > I set up a syslog.conf with the following entries:
    > > # chat logging
    > > local2.* -/var/log/chat.err
    > > # pppd logging
    > > daemon.* -/var/log/pppd.err

    >
    > > But when running syslogd and executing
    > > /usr/sbin/pppd call uklinux
    > > only a /var/log/messages file is created. The debug information for
    > > chat and pppd put in this file

    >
    > You likely forgot to send a SIGHUP to syslogd to cause it to reread
    > syslog.conf so it knows about the new entries.


    Not only that, but syslogd doesn't create files for you. You have to
    touch them into existence *first* and *then* send HUP to syslogd.

    > The ^M is a carriage-return sent as a result of changing the chat
    > script to end with "". This could explain why the other side of
    > the connection doesn't appear to speak PPP. Remove the "" or
    > replace the quotes with '\c'.


    That could easily be the cause. Hard to tell, though ...

    --
    James Carlson, Solaris Networking
    Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

  8. Re: PPP scripting on linux PDA

    James Carlson wrote:
    > Clifford Kite writes:


    >> You likely forgot to send a SIGHUP to syslogd to cause it to reread
    >> syslog.conf so it knows about the new entries.


    > Not only that, but syslogd doesn't create files for you. You have to
    > touch them into existence *first* and *then* send HUP to syslogd.


    Actually the Linux syslogd version does create the file. Verified,
    as always when posting against you.

    --
    Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    PPP-Q&A links, downloads: http://ckite.no-ip.net/
    /* Bluffing in a poker game can win big; bluffing in a newsgroup
    only attracts sharks. */

+ Reply to Thread