Re: Keeping pppd alive--how?

From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 10/31/04

  • Next message: Phisherman: "Re: Keeping pppd alive--how?"
    Date: Sat, 30 Oct 2004 18:18:41 -0500
    
    

    In article <ueu6o013atv2c38a6pq29kaus8i0s6crsj@4ax.com>, Phisherman wrote:

    >>> Sometimes a family member will startup this script if I am
    >>>not present. I always have this computer logged in as root--I know
    >>>this not a good idea, but physical security is not a big concern.

    So make /usr/sbin/pppd SUID, then anyone can run it. Personally, I
    start pppd out of the boot scripts, and run it in the demand mode, so
    that it brings up the link as needed. See the options "demand", "idle",
    and "holdoff" if you want to do that.

    >>>Here's my script (called s) that dials up the ISP and starts the
    >>>firewall:
    >>>
    >>>#!/bin/sh
    >>>#
    >>>./ppp-on
    >>>sleep 40s
    >>>./fire

    Run the 'fire' script out of /etc/ppp/ip-up (RH wants you to _create_
    /etc/ppp/ip-up.local instead - probably a good idea). See the pppd man
    page under SCRIPTS.

    >My ppp-on script contains only one (rather tricky with the single and
    >double quotes) command:
    >
    >/usr/sbin/pppd name "xxxxxxxxx@worldnet.att.net" -d connect
    >'/usr/sbin/chat -t 45 ABORT BUSY "" ATDT824xxxx CONNECT ""' /dev/modem
    >115200 noipdefault modem defaultroute crtscts

    1. Loose the '-t 45' as that is the default for chat
    2. Grab your modem manual and find out what the correct init string is.
    3. Replace the "" after the CONNECT with \d\c
    4. Rather than 'name "mumble"', I'd use the 'user "mumble" option'
    5. Look in the man page for pppd, and discover what "persist" does.

    Using 'killall pppd' is correct. The rational for step 2 is that you
    have no idea what the modem is doing before you talk to it. AT&F0 or AT&F1
    is probably what you want - ATZ is _definitely_not_ it. The rational
    for step 3 is in the chat man page. Briefly, /d says to wait one second
    (after receiving the "CONNECT" string), and the /c says to exit chat without
    sending the newline character that may screw up some terminal servers. Your
    empty quotes send that newline and that is not desired for portability.

    >Perhaps there is an option in the pppd command that will keep my
    >connection alive? Anyone know?

    Did you look in the man page? It's there as noted above.

            Old guy


  • Next message: Phisherman: "Re: Keeping pppd alive--how?"

    Relevant Pages

    • Modem, chat & pppd...
      ... How can I test if chat and pppd can see the modem? ... Minicom can initalizing the modem and the modem can compose the ...
      (comp.os.linux.embedded)
    • Re: Modem, chat & pppd...
      ... > How can I test if chat and pppd can see the modem? ... > telephone number I give it, but with pppd and chat I cant do this. ... Now I can see the modem and I can compose the number, ...
      (comp.os.linux.embedded)
    • Re: Keeping pppd alive--how?
      ... >start pppd out of the boot scripts, and run it in the demand mode, so ... Grab your modem manual and find out what the correct init string is. ... I won't know if it keeps the connection until tomorrow. ...
      (alt.os.linux.redhat)
    • Re: modem hang up
      ... > I know that modem problems are largely discussed here, ... Tell us how you launch pppd and how you connect with the modem. ... with the modem then add the -v chat option. ... configure whatever dial-out pppd frontend you use ...
      (comp.os.linux.networking)
    • Re: [SLE] Dialup problems
      ... What I have is a normal external 56k modem. ... Break the connection manually. ... # Defaultroute: no: pppd will not set the default route to the remote ip ...
      (SuSE)