Start, Inspect and Stop PPP Connections with pon and poff
You will finish with a short, repeatable workflow for bringing up one configured PPP peer, checking what happened, and stopping the intended connection. The examples follow the installed Debian PPP scripts from package ppp 2.4.9-1+1.1ubuntu4. Allow about fifteen minutes, plus the time needed for your modem, chat script or provider to connect.
The route
Jump straight to the step you need, or tick off Done means at the end.
You need ppp installed, a peer file under /etc/ppp/peers/, and permission to use it. The installed pon script checks that this directory is readable; on this machine an ordinary user without the relevant group membership receives an access error. You may need the administrator to add the account to the system's PPP access group. Do not put passwords in commands or paste secrets into a support transcript.
1. Check the available peer and command
Start with read-only checks. Replace PEER_NAME with the basename of the peer file you have been given, such as provider or home-vpn:
$ command -v pon poff plog
/usr/bin/pon
/usr/bin/poff
/usr/bin/plog
$ ls -l /etc/ppp/peers/PEER_NAME
$ pon --help
Usage: pon [OPTIONS] [provider] [arguments]
The peer name is not an arbitrary label. pon PEER_NAME selects /etc/ppp/peers/PEER_NAME. The file's contents can refer to a chat script, credentials and device settings, so inspect them through your normal privileged review process rather than changing a working file casually.
Checkpoint
Continue only when the peer file exists and you know which account is allowed to start it. If ls or pon reports permission denied, fix access with the system administrator; do not make the peer file world-readable.
2. Start one named PPP peer
Starting a connection changes network state and may trigger calls or charges. Confirm the peer name before running this command:
$ pon PEER_NAME
pon normally produces no success message. It passes the peer name to pppd; extra arguments after the peer are passed on as additional pppd arguments. Do not add options copied from a different provider's instructions without checking that provider's peer configuration.
With no argument, pon first runs /etc/ppp/ppp_on_boot when that file exists and is executable. Otherwise it uses /etc/ppp/peers/provider. That default can surprise you on a host with several peers, so naming the peer explicitly is clearer.
Verify the process and inspect the latest log lines:
$ pgrep -a pppd
$ plog
plog shows the tail of /var/log/ppp.log when that file is non-empty. If it is absent or empty, it filters the tail of /var/log/syslog for pppd and chat messages. It needs root or membership of the adm group. To ask for more lines, pass an option understood by tail, for example plog -n 50.
3. Diagnose a failed start without repeating it blindly
If pon names a missing peer, it reports that /etc/ppp/peers/PEER_NAME does not exist. Check the exact spelling and list the directory with the access needed to do so:
$ ls -l /etc/ppp/peers/
$ plog -n 50
If a connection process exists but the link did not become usable, read the chat and PPP messages before retrying. A second pon can create another simultaneous connection; the manual explicitly permits multiple connections. Check first:
$ pgrep -a pppd
$ ps -o pid,args -C pppd
Do not treat an empty plog result as proof that the start failed. Logging may be going to the system log, access may be restricted, or the process may have exited quickly. Use the exit status immediately after the command you are testing:
$ pon PEER_NAME
$ printf 'pon exit status: %s\n' "$?"
A zero status means the start script accepted the request. It does not prove that authentication, carrier detection or IP configuration succeeded; those require the process and log checks.
4. Stop exactly one connection
Stopping PPP is service-disrupting. If exactly one pppd is running, poff with no argument stops or signals it:
$ poff
$ printf 'poff exit status: %s\n' "$?"
$ pgrep -a pppd || true
When more than one connection is active, an argument-free poff refuses to choose and exits with status 1. Name the peer instead:
$ poff PEER_NAME
Check the process list afterwards. If the named peer is not found, the script reports that it could not find a matching pppd call PEER_NAME process. That is a useful safeguard: stop investigating the peer name rather than sending signals to unrelated processes.
Warning
poff -a stops all running PPP connections and ignores a provider argument. Use it only when taking every PPP link down is intentional. There is no automatic undo for a stop; reconnect with pon PEER_NAME after checking why the link was stopped.
5. Use the signalling options deliberately
poff accepts one option at a time. -r asks pppd to drop the line and redial, -d toggles its debug state, and -c asks it to renegotiate compression:
$ poff -r PEER_NAME
$ poff -d PEER_NAME
$ poff -c PEER_NAME
These commands signal a live connection. Use them only when the peer's operational procedure calls for that particular action. For a normal shutdown, use plain poff PEER_NAME. poff -h prints help, while the installed script reports its version with poff -v:
$ poff -v
/usr/bin/poff: 1.8
Done means
- The intended peer file exists under
/etc/ppp/peers/and access is correctly scoped. pon PEER_NAMEwas followed by a process and log check, not just a silent return to the prompt.- You know whether
plogread/var/log/ppp.logor the filtered system log, and have administrator access if needed. - You stopped only the intended peer, or consciously used
poff -afor every PPP connection.