Re: PPPD and demand dialing
From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 03/30/05
- Previous message: Moe Trin: "Re: ATT global"
- In reply to: Jeffrey C. Dege: "PPPD and demand dialing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Mar 2005 17:36:46 -0600
In article <slrnd4hqs6.1ks.jdege@jdege.visi.com>, Jeffrey C. Dege wrote:
>I need PPPD to work in demand-dial mode.
>
>I tried to add the options using the GUI network configuration tool,
>but I couldn't get it to work, and I couldn't figure out why.
Without the logs or other details, I doubt anyone else can tell - we
can't see what's happening on your system. Damn security problem, I
guess. ;-)
>So I tracked down the file that the tool was creating, ifcfg-ppp0,
>and went in and edited it directly.
>
>My question is why, since pppd has supported demand dialing for years
>now, and since the sysconfig networking system has explicit options
>for configuring demand dialing, why have these options never been made
>configurable from the GUI?
I gave up on those scripts. They are written by an expert script writer,
who delights in showing how complex he can make things. "One script that
can be used for everything" - yeah, right.
[compton ~]$ cat /usr/local/bin/dialin
#!/bin/bash
exec /usr/sbin/pppd connect "/usr/sbin/chat -f /etc/ppp/dialscript" \
defaultroute lock noipdefault modem /dev/modem 115200 crtscts \
user ibuprofin nodetach
[compton ~]$
There must not be anything after the \ in those two lines.
[compton ~]$ cat /etc/ppp/dialscript
ABORT BUSY ABORT 'NO CARRIER' "" AT&F1 OK ATDT2662902 CONNECT \d\c
[compton ~]$
Modify those two scripts as needed so that root can run them from the
command line. That probably means username, modem init string, phone
number and maybe device name. This also requires /etc/ppp/*secrets,
and /etc/resolv.conf to be configured, but I assume you know that. When
the scripts work for you, remove the 'nodetach' option, and add 'demand
idle 300 holdoff 15'. Then edit one of the boot scripts - I suggest using
/etc/rc.d/rc.local - and add the following:
echo -n 1 > /proc/sys/net/ipv4/ip_dynaddr
/usr/local/bin/dialin
The first line is used to tell a 2.2.x or later kernel that the system will
have dynamic IP addresses, while the second line runs the dialin script. As
this file (rc.local) is run by root, the daemon will be running as root.
Now, pppd will start, but stay in the background and respond to requests for
IP services after that. The idle 300 will cause the system to disconnect
when the ppp link has been idle for 5 minutes (300 seconds). The holdoff 15
means the system will not try to redial for 15 seconds after an idle
timeout, to allow everything to recover.
>And as an aside, where should I go for advice on configuring the rest of
>this beast? I have a couple more steps to get done before I close down
>my old system - getting email and usenet working, installing xringd, etc.
I dunno - what's wrong with the regular comp.os.linux.* newsgroups?
>Where should I go to ask questions?
No put-down intended - ALWAYS hit http://groups.google.com first. In
most cases, your question has been answered several to many times before.
Old guy
- Previous message: Moe Trin: "Re: ATT global"
- In reply to: Jeffrey C. Dege: "PPPD and demand dialing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|