PPP Remote Control FAQ

By Josef Drexler.

Version 0.7.1, November 4, 2000

1) I don't have anything in /etc/ppp/peers. How do I use ppp-rc?

If you can run pppd without options and successfully get a connection, you probably have all the settings in /etc/ppp/options. Then you can just create an empty file in /etc/ppp/peers, for example with
# touch /etc/ppp/peers/MyISP
and use this as your selection.

2) I get the message "No entries or command not found" but it used to work

ppp-rc is now using Perl's "taint mode" to watch for some security risks. In doing so it needs to use a safe PATH environment, which means that all commands need an explicit path.

You probably need to put a "/bin/" before the "ls" in the $peerlist option.

3) How can I see the output of chat or pppd?

ppp-rc shows the stdout and stderr output from pppd, which includes stderr output from chat.

For chat: run it with the -vsS options (read the man page)
For pppd: use the debug option and/or "logfd 2" (read the man page)

Since ppp-rc version 0.7, this has become a bit easier. Simply set the option to have a debug button ($havedebugbutton=1 in ppp-rc.cgi), and call chat like this in the ppp options:

connect '/bin/sh -c "/usr/sbin/chat $verbswitch -Ssf /etc/ppp/mychat"'
The actual commandline may be different, but it has to be run through a shell, because $verbswitch will equal to '-v' if the debug button is pressed.

4) Why don't I see any output at all?

Your pppd options file probably has "detach" somewhere. Replace this with "updetach", which makes pppd wait for a network protocol comes up before it returns. ppp-rc tries to override this in any case, but depending on where you have the detach option, it may not be possible unless you change it.

5) The connection gets established but the script just hangs!

Your pppd options file probably has "nodetach" somewhere. Replace this with "updetach", which makes pppd wait for a network protocol to come up before it returns.

This also happens if pppd is started such that the device is not a terminal, for example with wvdial. In this case, the script will never finish because pppd cannot detach. If you insist on this configuration, you'll have to abort the loading of the start page. The connection should work nonetheless.

6) How do I use ppp-rc with <some other dialup program>?

The best way is to switch to a standalone ppp configuration instead. Once you really start using ppp-rc there shouldn't be a need for other dialers.

Here's a list of sites that may help you with this:

It is possible to use other dialers by changing the $pppd, $peerlist and $peerpattern variables in the ppp-rc.cgi code. $peerlist is an external command that is run to determine the list of possible connections. The output is run through the $peerpattern regular expression to determine the names. Then, when a selection is to be started, the name is substituted into the second %s place holder in $pppd, which contains the command to be run. The first %s will be "debug" if the debug button has been pressed. To disable this, write %0.0s instead of the first %s.