Name Date Size #Lines LOC

..--

chat/H29-Jan-2025-2,3271,886

m4/H29-Jan-2025-

pppd/H29-Jan-2025-38,14026,917

pppdump/H29-Jan-2025-1,6981,257

pppstats/H29-Jan-2025-795682

sample/H29-Jan-2025-281172

AUTHORSH A D29-Jan-2025179

COPYINGH A D29-Jan-2025278

ChangeLogH A D29-Jan-202590

Changes-2.4H A D29-Jan-20259.6 KiB

FAQH A D09-Jul-202425.3 KiB637470

LICENSE.BSDH A D29-Jan-20251.5 KiB

LICENSE.GPL-2H A D29-Jan-202517.7 KiB

NEWSH A D29-Jan-20259.8 KiB

PLUGINSH A D29-Jan-202514 KiB

READMEH A D29-Jan-20258 KiB

README.MPPEH A D09-Jul-20242.8 KiB7952

README.MSCHAP80H A D29-Jan-20256.1 KiB

README.MSCHAP81H A D09-Jul-20242.4 KiB6646

README.cbcpH A D29-Jan-20252 KiB

README.eap-srpH A D09-Jul-20246.2 KiB150110

README.eap-tlsH A D29-Jan-20258.7 KiB

README.pppol2tpH A D09-Jul-20242.5 KiB6754

README.pwfdH A D09-Jul-20243.5 KiB175124

SECURITY.mdH A D29-Jan-2025212

SETUPH A D09-Jul-20244.1 KiB11285

Submitting-patches.mdH A D09-Jul-20244.6 KiB10681

autogen.shH A D29-Jan-2025475

configure.acH A D29-Jan-202511.7 KiB

README.MPPE

1PPP Support for MPPE (Microsoft Point to Point Encryption)
2==========================================================
3
4Frank Cusack		frank@google.com
5Mar 19, 2002
6
7Updated by Paul Mackerras, Sep 2008
8
9
10DISCUSSION
11
12MPPE is Microsoft's encryption scheme for PPP links.  It is pretty much
13solely intended for use with PPP over Internet links -- if you have a true
14point to point link you have little need for encryption.  It is generally
15used with PPTP.
16
17MPPE is negotiated within CCP (Compression Control Protocol) as option
1818.  In order for MPPE to work, both peers must agree to do it.  This
19complicates things enough that I chose to implement it as strictly a binary
20option, off by default.  If you turn it on, all other compression options
21are disabled and MPPE *must* be negotiated successfully in both directions
22(CCP is unidirectional) or the link will be disconnected.  I think this is
23reasonable since, if you want encryption, you want encryption.  That is,
24I am not convinced that optional encryption is useful.
25
26While PPP regards MPPE as a "compressor", it actually expands every frame
27by 4 bytes, the MPPE overhead (encapsulation).
28
29Because of the data expansion, you'll see that ppp interfaces get their
30mtu reduced by 4 bytes whenever MPPE is negotiated.  This is because
31when MPPE is active, it is *required* that *every* packet be encrypted.
32PPPD sets the mtu = MIN(peer mru, configured mtu).  To ensure that
33MPPE frames are not larger than the peer's mru, we reduce the mtu by 4
34bytes so that the network layer never sends ppp a packet that's too large.
35
36There is an option to compress the data before encrypting (MPPC), however
37the algorithm is patented and requires execution of a license with Hifn.
38MPPC as an RFC is a complete farce.  I have no further details on MPPC.
39
40Some recommendations:
41
42- Use stateless mode.  Stateful mode is disabled by default.  Unfortunately,
43  stateless mode is very expensive as the peers must rekey for every packet.
44- Use 128-bit encryption.
45- Use MS-CHAPv2 only.
46
47Reference documents:
48
49    <http://www.ietf.org/rfc/rfc3078.txt> MPPE
50    <http://www.ietf.org/rfc/rfc3079.txt> MPPE Key Derivation
51    <http://www.ietf.org/rfc/rfc2118.txt> MPPC
52    <http://www.ietf.org/rfc/rfc2637.txt> PPTP
53    <http://www.ietf.org/rfc/rfc2548.txt> MS RADIUS Attributes
54
55You might be interested in PoPToP, a Linux PPTP server.  You can find it at
56<http://www.poptop.org/>
57
58RADIUS support for MPPE is from Ralf Hofmann, <ralf.hofmann@elvido.net>.
59
60
61BUILDING THE PPPD
62
63The userland component of PPPD has no additional requirements above
64those for MS-CHAP and MS-CHAPv2.
65
66MPPE support is now included in the mainline Linux kernel releases.
67
68
69CONFIGURATION
70
71See pppd(8) for the MPPE options.  Under Linux, if your modutils is earlier
72than 2.4.15, you will need to add
73
74    alias ppp-compress-18 ppp_mppe
75
76to /etc/modules.conf.
77
78
79

README.MSCHAP81

1PPP Support for Microsoft's CHAP-81
2===================================
3
4Frank Cusack		frank@google.com
5
6Some text verbatim from README.MSCHAP80,
7by Eric Rosenquist, rosenqui@strataware.com
8
9INTRODUCTION
10
11First, please read README.MSCHAP80; almost everything there applies here.
12MS-CHAP was basically devised by Microsoft because rather than store
13plaintext passwords, they (Microsoft) store the md4 hash of passwords.
14It provides no advantage over standard CHAP, since the hash is used
15as plaintext-equivalent.  (Well, the Change-Password packet is arguably
16an advantage.)  It does introduce a significant weakness if the LM hash
17is used.  Additionally, the format of the failure packet potentially
18gives information to an attacker.  The weakness of the LM hash is partly
19addressed in RFC 2433, which deprecates its use.
20
21MS-CHAPv2 adds 2 benefits to MS-CHAP.  (1) The LM hash is no longer
22used.  (2) Mutual authentication is required.  Note that the mutual
23authentication in MS-CHAPv2 is different than the case where both PPP
24peers require authentication from the other; the former proves that
25the server has access to the client's password, the latter proves that
26the server has access to a secret which the client also has -- which
27may or may not be the same as the client's password (but should not be
28the same, per RFC 1994).  Whether this provides any actual benefit is
29outside the scope of this document.  The details of MS-CHAPv2 can be
30found in the document:
31
32    <http://www.ietf.org/rfc/rfc2759.txt>
33
34
35BUILDING THE PPPD
36
37In addition to the requirements for MS-CHAP, MS-CHAPv2 uses the SHA-1
38hash algorithm.  A public domain implementation is provided with pppd.
39
40
41TROUBLESHOOTING
42
43Assuming that everything else has been configured correctly for PPP and
44CHAP, the MS-CHAPv2-specific problems you're likely to encounter are mostly
45related to your Windows NT account and its settings.  A Microsoft server
46returns error codes in its CHAP response.  The following are extracted from
47RFC 2759:
48
49 646 ERROR_RESTRICTED_LOGON_HOURS
50 647 ERROR_ACCT_DISABLED
51 648 ERROR_PASSWD_EXPIRED
52 649 ERROR_NO_DIALIN_PERMISSION
53 691 ERROR_AUTHENTICATION_FAILURE
54 709 ERROR_CHANGING_PASSWORD
55
56You'll see these in your pppd log as a line similar to:
57
58   Remote message: E=649 No dialin permission
59
60Previously, pppd would log this as:
61
62   Remote message: E=649 R=0
63
64Now, the text message is logged (both for MS-CHAP and MS-CHAPv2).
65
66

README.eap-srp

1EAP with MD5-Challenge and SRP-SHA1 support
2by James Carlson, Sun Microsystems
3Version 2, September 22nd, 2002
4
5
61.  What it does
7
8    The Extensible Authentication Protocol (EAP; RFC 2284) is a
9    security protocol that can be used with PPP.  It provides a means
10    to plug in multiple optional authentication methods.
11
12    This implementation includes the required default MD5-Challenge
13    method, which is similar to CHAP (RFC 1994), as well as the new
14    SRP-SHA1 method.  This latter method relies on an exchange that is
15    not vulnerable to dictionary attacks (as is CHAP), does not
16    require the server to keep a cleartext copy of the secret (as in
17    CHAP), supports identity privacy, and produces a temporary shared
18    key that could be used for data encryption.
19
20    The SRP-SHA1 method is based on draft-ietf-pppext-eap-srp-03.txt,
21    a work in progress.
22
232.  Required libraries
24
25    Two other packages are required first.  Download and install
26    OpenSSL and Thomas Wu's SRP implementation.
27
28	http://www.openssl.org/ (or ftp://ftp.openssl.org/source/)
29	http://srp.stanford.edu/
30
31    Follow the directions in each package to install the SSL and SRP
32    libraries.  Once SRP is installed, you may run tconf as root to
33    create known fields, if desired.  (This step is not required.)
34
353.  Installing the patch
36
37    The EAP-SRP patch described here is integrated into this version
38    of pppd.  The following patch may be used with older pppd sources:
39
40	ftp://playground.sun.com/carlsonj/eap/ppp-2.4.1-eap-1.tar.gz
41
42    Configure, compile, and install as root.  You may want to edit
43    pppd/Makefile after configuring to enable or disable optional
44    features.
45
46	% ./configure
47	% make
48	% su
49	# make install
50
51    If you use csh or tcsh, run "rehash" to pick up the new commands.
52
53    If you're using Solaris, and you run into trouble with the
54    pseudonym feature on the server side ("no DES here" shows in the
55    log file), make sure that you have the "domestic" versions of the
56    DES libraries linked.  You should see "crypt_d" in "ldd
57    /usr/local/bin/pppd".  If you see "crypt_i" instead, then make
58    sure that /usr/lib/libcrypt.* links to /usr/lib/libcrypt_d.*.  (If
59    you have the international version of Solaris, then you won't have
60    crypt_d.  You might want to find an alternative DES library.)
61
624.  Adding the secrets
63
64    On the EAP SRP-SHA1 client side, access to the cleartext secret is
65    required.  This can be done in two ways:
66
67	- Enter the client name, server name, and password in the
68          /etc/ppp/srp-secrets file.  This file has the same format as
69          the existing chap-secrets and pap-secrets files.
70
71	  clientname servername "secret here"
72
73	- Use the "password" option in any of the standard
74          configuration files (or the command line) to specify the
75          secret.
76
77	  password "secret here"
78
79    On the EAP SRP-SHA1 server side, a secret verifier is required.
80    This is a one-way hash of the client's name and password.  To
81    generate this value, run the srp-entry program (see srp-entry(8)).
82    This program prompts for the client name and the passphrase (the
83    secret).  The output will be an entry, such as the following,
84    suitable for use in the server's srp-secrets file.  Note that if
85    this is transferred by cut-and-paste, the entry must be a single
86    line of text in the file.
87
88pppuser srpserver 0:LFDpwg4HBLi4/kWByzbZpW6pE95/iIWBSt7L.DAkHsvwQphtiq0f6reoUy/1LC1qYqjcrV97lCDmQHQd4KIACGgtkhttLdP3KMowvS0wLXLo25FPJeG2sMAUEWu/HlJPn2/gHyh9aT.ZxUs5MsoQ1E61sJkVBc.2qze1CdZiQGTK3qtWRP6DOpM1bfhKtPoVm.g.MiCcTMWzc54xJUIA0mgKtpthE3JrqCc81cXUt4DYi5yBzeeGTqrI0z2/Gj8Jp7pS4Fkq3GmnYjMxnKfQorFXNwl3m7JSaPa8Gj9/BqnorJOsnSMlIhBe6dy4CYytuTbNb4Wv/nFkmSThK782V:2cIyMp1yKslQgE *
89
90    The "secret" field consists of three entries separated by colons.
91    The first entry is the index of the modulus and generator from
92    SRP's /etc/tpasswd.conf.  If the special value 0 is used, then the
93    well-known modulus/generator value is used (this is recommended,
94    because it is much faster).  The second value is the verifier
95    value.  The third is the password "salt."  These latter two values
96    are encoded in base64 notation.
97
98    For EAP MD5-Challenge, both client and server use the existing
99    /etc/ppp/chap-secrets file.
100
1015.  Configuration options
102
103    There are two main options relating to EAP available for the
104    client.  These are:
105
106	refuse-eap		- refuse to authenticate with EAP
107	srp-use-pseudonym	- use the identity privacy if
108				  offered by server
109
110    The second option stores a pseudonym, if offered by the EAP
111    SRP-SHA1 server, in the $HOME/.ppp_pseudonym file.  The pseudonym
112    is typically an encrypted version of the client identity.  During
113    EAP start-up, the pseudonym stored in this file is offered to the
114    peer as the identity.  If this is accepted by the peer, then
115    eavesdroppers will be unable to determine the identity of the
116    client.  Each time the client is authenticated, the server will
117    offer a new pseudoname to the client using an obscured (reversibly
118    encrypted) message.  Thus, access across successive sessions
119    cannot be tracked.
120
121    There are two main options for EAP on the server:
122
123	require-eap		- require client to use EAP
124	srp-pn-secret "string"	- set server's pseudoname secret
125
126    The second option sets the long-term secret used on the server to
127    encrypt the user's identity to produce pseudonames.  The
128    pseudoname is constructed by hashing this string with the current
129    date (to the nearest day) with SHA1, then using this hash as the
130    key for a DES encryption of the client's name.  The date is added
131    to the hash for two reasons.  First, this allows the pseudonym to
132    change daily.  Second, it allows the server to decode any previous
133    pseudonym by trying previous dates.
134
135    See the pppd(8) man page for additional options.
136
1376.  Comments welcome!
138
139    This is still an experimental implementation.  It has been tested
140    and reviewed carefully for correctness, but may still be
141    incomplete or have other flaws.  All comments are welcome.  Please
142    address them to the author:
143
144		james.d.carlson@sun.com
145
146    or, for EAP itself or the SRP extensions to EAP, to the IETF PPP
147    Extensions working group:
148
149		ietf-ppp@merit.edu
150

README.pppol2tp

1PPPoL2TP plugin
2===============
3
4The pppol2tp plugin lets pppd use the Linux kernel driver pppol2tp.ko
5to pass PPP frames in L2TP tunnels. The driver was integrated into the
6kernel in the 2.6.23 release. For kernels before 2.6.23, an
7out-of-tree kernel module is available from the pppol2tp-kmod package
8in the OpenL2TP project.
9
10Note that pppd receives only PPP control frames over the PPPoL2TP
11socket; data frames are handled entirely by the kernel.
12
13The pppol2tp plugin adds extra arguments to pppd and uses the Linux kernel
14PPP-over-L2TP driver to set up each session's data path.
15
16Arguments are:-
17
18pppol2tp <fd>                   - FD for PPPoL2TP socket
19pppol2tp_lns_mode               - PPPoL2TP LNS behavior. Default off.
20pppol2tp_send_seq               - PPPoL2TP enable sequence numbers in
21                                  transmitted data packets. Default off.
22pppol2tp_recv_seq               - PPPoL2TP enforce sequence numbers in
23                                  received data packets. Default off.
24pppol2tp_reorderto <millisecs>  - PPPoL2TP data packet reorder timeout.
25                                  Default 0 (no reordering).
26pppol2tp_debug_mask <mask>      - PPPoL2TP debug mask. Bitwise OR of
27				  1 - verbose debug
28				  2 - control
29				  4 - kernel transport
30				  8 - ppp packet data
31				  Default: 0 (no debug).
32pppol2tp_ifname <ifname>	- Name of PPP network interface visible
33				  to "ifconfig" and "ip link".
34				  Default: "pppN"
35pppol2tp_tunnel_id <id>		- L2TP tunnel_id tunneling this PPP
36				  session.
37pppol2tp_session_id <id>	- L2TP session_id of this PPP session.
38				  The tunnel_id/session_id pair is used
39				  when sending event messages to openl2tpd.
40
41pppd will typically be started by an L2TP daemon for each L2TP sesion,
42supplying one or more of the above arguments as required. The pppd
43user will usually have no visibility of these arguments.
44
45Two hooks are exported by this plugin.
46
47void (*pppol2tp_send_accm_hook)(int tunnel_id, int session_id,
48     uint32_t send_accm, uint32_t recv_accm);
49void (*pppol2tp_ip_updown_hook)(int tunnel_id, int session_id, int up);
50
51Credits
52=======
53
54This plugin was developed by Katalix Systems as part of the OpenL2TP
55project, http://openl2tp.sourceforge.net. OpenL2TP is a full-featured
56L2TP client-server, suitable for use as an enterprise L2TP VPN server
57or a VPN client.
58
59Please copy problems to the OpenL2TP mailing list:
60openl2tp-users@lists.sourceforge.net.
61
62Maintained by:
63	James Chapman
64	jchapman@katalix.com
65	Katalix Systems Ltd
66	http://www.katalix.com
67

README.pwfd

1
2	Support to pass the password via a pipe to the pppd
3	---------------------------------------------------
4
5	Arvin Schnell <arvin@suse.de>
6	2002-02-08
7
8
91. Introduction
10---------------
11
12Normally programs like wvdial or kppp read the online password from their
13config file and store them in the pap- and chap-secrets before they start the
14pppd and remove them afterwards. Sure they need special privileges to do so.
15
16The passwordfd feature offers a simpler and more secure solution. The program
17that starts the pppd opens a pipe and writes the password into it. The pppd
18simply reads the password from that pipe.
19
20This methods is used for quite a while on SuSE Linux by the programs wvdial,
21kppp and smpppd.
22
23
242. Example
25----------
26
27Here is a short C program that uses the passwordfd feature. It starts the pppd
28to buildup a pppoe connection.
29
30
31--snip--
32
33#include <stdio.h>
34#include <stdlib.h>
35#include <unistd.h>
36#include <signal.h>
37#include <string.h>
38#include <paths.h>
39
40#ifndef _PATH_PPPD
41#define _PATH_PPPD "/usr/sbin/pppd"
42#endif
43
44
45// Of course these values can be read from a configuration file or
46// entered in a graphical dialog.
47char *device = "eth0";
48char *username = "1122334455661122334455660001@t-online.de";
49char *password = "hello";
50
51pid_t pid = 0;
52
53
54void
55sigproc (int src)
56{
57    fprintf (stderr, "Sending signal %d to pid %d\n", src, pid);
58    kill (pid, src);
59    exit (EXIT_SUCCESS);
60}
61
62
63void
64sigchild (int src)
65{
66    fprintf (stderr, "Daemon died\n");
67    exit (EXIT_SUCCESS);
68}
69
70
71int
72start_pppd ()
73{
74    signal (SIGINT, &sigproc);
75    signal (SIGTERM, &sigproc);
76    signal (SIGCHLD, &sigchild);
77
78    pid = fork ();
79    if (pid < 0) {
80	fprintf (stderr, "unable to fork() for pppd: %m\n");
81	return 0;
82    }
83
84    if (pid == 0) {
85
86	int i, pppd_argc = 0;
87	char *pppd_argv[20];
88	char buffer[32] = "";
89	int pppd_passwdfd[2];
90
91	for (i = 0; i < 20; i++)
92	    pppd_argv[i] = NULL;
93
94	pppd_argv[pppd_argc++] = "pppd";
95
96	pppd_argv[pppd_argc++] = "call";
97	pppd_argv[pppd_argc++] = "pwfd-test";
98
99	// The device must be after the call, since the call loads the plugin.
100	pppd_argv[pppd_argc++] = device;
101
102	pppd_argv[pppd_argc++] = "user";
103	pppd_argv[pppd_argc++] = username;
104
105	// Open a pipe to pass the password to pppd.
106	if (pipe (pppd_passwdfd) == -1) {
107	    fprintf (stderr, "pipe failed: %m\n");
108	    exit (EXIT_FAILURE);
109	}
110
111	// Of course this only works it the password is shorter
112	// than the pipe buffer. Otherwise you have to fork to
113	// prevent that your main program blocks.
114	write (pppd_passwdfd[1], password, strlen (password));
115	close (pppd_passwdfd[1]);
116
117	// Tell the pppd to read the password from the fd.
118	pppd_argv[pppd_argc++] = "passwordfd";
119	snprintf (buffer, 32, "%d", pppd_passwdfd[0]);
120	pppd_argv[pppd_argc++] = buffer;
121
122	if (execv (_PATH_PPPD, (char **) pppd_argv) < 0) {
123	    fprintf (stderr, "cannot execl %s: %m\n", _PATH_PPPD);
124	    exit (EXIT_FAILURE);
125	}
126    }
127
128    pause ();
129
130    return 1;
131}
132
133
134int
135main (int argc, char **argv)
136{
137    if (start_pppd ())
138	exit (EXIT_SUCCESS);
139
140    exit (EXIT_FAILURE);
141}
142
143---snip---
144
145
146Copy this file to /etc/ppp/peers/pwfd-test. The plugins can't be loaded on the
147command line (unless you are root) since the plugin option is privileged.
148
149
150---snip---
151
152#
153# PPPoE plugin for kernel 2.4
154#
155plugin pppoe.so
156
157#
158# This plugin enables us to pipe the password to pppd, thus we don't have
159# to fiddle with pap-secrets and chap-secrets. The user is also passed
160# on the command line.
161#
162plugin passwordfd.so
163
164noauth
165usepeerdns
166defaultroute
167hide-password
168nodetach
169nopcomp
170novjccomp
171noccp
172
173---snip---
174
175