Files
login/docs/ppp.md
T
Claude 676d1f7e2d README as a landing page; the details move to docs/
Building, running from app_dmodem, configuration, authentication, PPP,
security notes and the tests move from the 827-line README into docs/,
unchanged but for their heading levels and relative links. The README
keeps a summary, the sample session, features, a quick start, the
suite's repositories and the licence. D-Modem-RE becomes D-Modem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
2026-11-05 10:44:33 +00:00

46 lines
2.1 KiB
Markdown

# PPP dialers
## PPP dialers: AutoPPP and PAP
Windows' Dial-Up Networking and most PPP dialers never see a login
prompt: they start PPP as soon as the modems connect, and log in inside
it with PAP. With `[autoppp] enabled = yes`, a PPP frame where the
login prompt wants a name makes modemmenu run `[autoppp] command` (pppd)
on the line instead:
```
[autoppp]
enabled = yes
command = exec /usr/sbin/pppd nodetach lock passive local 192.168.77.1:192.168.77.2 ms-dns 192.168.77.1 require-pap refuse-chap refuse-mschap refuse-mschap-v2 refuse-eap plugin modemmenu.so ipparam autoppp
item = ppp
```
pppd's `modemmenu.so` plugin ([pppd/modemmenu.c](../pppd/modemmenu.c);
`make` builds it when `ppp-dev`'s headers are there, `make install`
puts it in pppd's plugin directory) asks modemmenu for the PAP login on
an auth socket of the call's own, in pppd's environment as
`MODEMMENU_AUTH_SOCKET` (or `{auth_socket}` for its `modemmenu-socket`
option). modemmenu checks the login as at the prompt: the backends,
`user_pattern`, `attempts`, `fail_delay`; then the access rules of
`[autoppp] item` (its `users`, `groups`, `min_baud`, `callerids`);
then the time limits. The time left becomes pppd's `maxconnect` (and
modemmenu hangs pppd up soon after, should the link outlive it); the
call is logged, counted in the day's use and the last callers as a
login at the prompt is. pppd's scripts get the caller's name
(`PEERNAME`) and, from modemmenu, `MODEM_*` (the dialed number, the
caller ID, the rate).
- **PAP only.** CHAP and MS-CHAPv2 need the server to keep each
password where it can be read back, or an equivalent of it;
modemmenu's logins (bcrypt hashes, LDAP, PAM) do not. The sample's
pppd refuses them.
- **PAP's password crosses the line in clear.** Over the telephone
network that was the line's privacy; over SIP it is in the call's RTP:
give the trunk SRTP (and SIP over TLS), or keep it on a network you
trust.
- **Fix the addresses** (`local:remote` on pppd's command line): the
plugin lets the logged-in peer have the address pppd gives it.
- The plugin is built for the pppd of the headers it is built against
(`pppd_version`); rebuild it when pppd is upgraded.