]> git.ozlabs.org Git - ppp.git/blob - pppd/pppd.8
use shadow password stuff
[ppp.git] / pppd / pppd.8
1 .\" manual page [] for pppd 2.3
2 .\" $Id: pppd.8,v 1.25 1997/03/04 03:42:25 paulus Exp $
3 .\" SH section heading
4 .\" SS subsection heading
5 .\" LP paragraph
6 .\" IP indented paragraph
7 .\" TP hanging label
8 .TH PPPD 8
9 .SH NAME
10 pppd \- Point to Point Protocol daemon
11 .SH SYNOPSIS
12 .B pppd
13 [
14 .I tty_name
15 ] [
16 .I speed
17 ] [
18 .I options
19 ]
20 .SH DESCRIPTION
21 .LP
22 The Point-to-Point Protocol (PPP) provides a method for transmitting
23 datagrams over serial point-to-point links.  PPP
24 is composed of three parts: a method for encapsulating datagrams over
25 serial links, an extensible Link Control Protocol (LCP), and
26 a family of Network Control Protocols (NCP) for establishing
27 and configuring different network-layer protocols.
28 .LP
29 The encapsulation scheme is provided by driver code in the kernel.
30 Pppd provides the basic LCP, authentication support, and an NCP for
31 establishing and configuring the Internet Protocol (IP) (called the IP
32 Control Protocol, IPCP).
33 .SH FREQUENTLY USED OPTIONS
34 .TP
35 .I <tty_name>
36 Communicate over the named device.  The string "/dev/" is prepended if
37 necessary.  If no device name is given, or if the name of the terminal
38 connected to the standard input is given, pppd
39 will use that terminal, and will not fork to put itself in the
40 background.  This option is privileged if the \fInoauth\fR option is
41 used.
42 .TP
43 .I <speed>
44 Set the baud rate to <speed> (a decimal number).  On systems such as
45 4.4BSD and NetBSD, any speed can be specified.  Other systems
46 (e.g. SunOS) allow only a limited set of speeds.
47 .TP
48 .B asyncmap \fI<map>
49 Set the async character map to <map>.  This map describes which
50 control characters cannot be successfully received over the serial
51 line.  Pppd will ask the peer to send these characters as a 2-byte
52 escape sequence.  The argument is a 32 bit hex number with each bit
53 representing a character to escape.  Bit 0 (00000001) represents the
54 character 0x00; bit 31 (80000000) represents the character 0x1f or ^_.
55 If multiple \fIasyncmap\fR options are given, the values are ORed
56 together.  If no \fIasyncmap\fR option is given, no async character
57 map will be negotiated for the receive direction; the peer should then
58 escape \fIall\fR control characters.  To escape transmitted
59 characters, use the \fIescape\fR option.
60 .TP
61 .B auth
62 Require the peer to authenticate itself before allowing network
63 packets to be sent or received.
64 .TP
65 .B call \fIname
66 Read options from the file /etc/ppp/peers/\fIname\fR.  This file may
67 contain privileged options, such as \fInoauth\fR, even if pppd
68 is not being run by root.  The \fIname\fR string may not begin with /
69 or include .. as a pathname component.  The format of the options file
70 is described below.
71 .TP
72 .B connect \fIscript
73 Use the executable or shell command specified by \fIscript\fR to set
74 up the serial line.  This script would typically use the chat(8)
75 program to dial the modem and start the remote ppp session.  This
76 option is privileged if the \fInoauth\fR option is used.
77 .TP
78 .B crtscts
79 Use hardware flow control (i.e. RTS/CTS) to control the flow of data
80 on the serial port.  If neither the \fIcrtscts\fR nor the
81 \fInocrtscts\fR option is given, the hardware flow control setting
82 for the serial port is left unchanged.
83 .TP
84 .B defaultroute
85 Add a default route to the system routing tables, using the peer as
86 the gateway, when IPCP negotiation is successfully completed.
87 This entry is removed when the PPP connection is broken.  This option
88 is privileged if the \fInodefaultroute\fR option has been specified.
89 .TP
90 .B disconnect \fIscript
91 Run the executable or shell command specified by \fIscript\fR after
92 pppd has terminated the link.  This script could, for example, issue
93 commands to the modem to cause it to hang up if hardware modem control
94 signals were not available.  The disconnect script is not run if the
95 modem has already hung up.  This option is privileged if the
96 \fInoauth\fR option is used.
97 .TP
98 .B escape \fIxx,yy,...
99 Specifies that certain characters should be escaped on transmission
100 (regardless of whether the peer requests them to be escaped with its
101 async control character map).  The characters to be escaped are
102 specified as a list of hex numbers separated by commas.  Note that
103 almost any character can be specified for the \fIescape\fR option,
104 unlike the \fIasyncmap\fR option which only allows control characters
105 to be specified.  The characters which may not be escaped are those
106 with hex values 0x20 - 0x3f or 0x5e.
107 .TP
108 .B file \fIname
109 Read options from file \fIname\fR (the format is described below).
110 The file must be readable by the user who has invoked pppd.
111 .TP
112 .B lock
113 Specifies that pppd should create a UUCP-style lock file for the
114 serial device to ensure exclusive access to the device.
115 .TP
116 .B mru \fIn
117 Set the MRU [Maximum Receive Unit] value to \fIn\fR. Pppd
118 will ask the peer to send packets of no more than \fIn\fR bytes.  The
119 minimum MRU value is 128.  The default MRU value is 1500.  A value of
120 296 is recommended for slow links (40 bytes for TCP/IP header + 256
121 bytes of data).
122 .TP
123 .B mtu \fIn
124 Set the MTU [Maximum Transmit Unit] value to \fIn\fR.  Unless the
125 peer requests a smaller value via MRU negotiation, pppd will
126 request that the kernel networking code send data packets of no more
127 than \fIn\fR bytes through the PPP network interface. 
128 .TP
129 .B passive
130 Enables the "passive" option in the LCP.  With this option, pppd will
131 attempt to initiate a connection; if no reply is received from the
132 peer, pppd will then just wait passively for a valid LCP packet from
133 the peer, instead of exiting, as it would without this option.
134 .SH OPTIONS
135 .TP
136 .I <local_IP_address>\fB:\fI<remote_IP_address>
137 Set the local and/or remote interface IP addresses.  Either one may be
138 omitted.  The IP addresses can be specified with a host name or in
139 decimal dot notation (e.g. 150.234.56.78).  The default local
140 address is the (first) IP address of the system (unless the
141 \fInoipdefault\fR
142 option is given).  The remote address will be obtained from the peer
143 if not specified in any option.  Thus, in simple cases, this option is
144 not required.  If a local and/or remote IP address is specified with
145 this option, pppd
146 will not accept a different value from the peer in the IPCP
147 negotiation, unless the \fIipcp-accept-local\fR and/or
148 \fIipcp-accept-remote\fR options are given, respectively.
149 .TP
150 .B bsdcomp \fInr,nt
151 Request that the peer compress packets that it sends, using the
152 BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and
153 agree to compress packets sent to the peer with a maximum code size of
154 \fInt\fR bits.  If \fInt\fR is not specified, it defaults to the value
155 given for \fInr\fR.  Values in the range 9 to 15 may be used for
156 \fInr\fR and \fInt\fR; larger values give better compression but
157 consume more kernel memory for compression dictionaries.
158 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
159 compression in the corresponding direction.  Use \fInobsdcomp\fR or
160 \fIbsdcomp 0\fR to disable BSD-Compress compression entirely.
161 .TP
162 .B chap-interval \fIn
163 If this option is given, pppd will rechallenge the peer every \fIn\fR
164 seconds.
165 .TP
166 .B chap-max-challenge \fIn
167 Set the maximum number of CHAP challenge transmissions to \fIn\fR
168 (default 10).
169 .TP
170 .B chap-restart \fIn
171 Set the CHAP restart interval (retransmission timeout for challenges)
172 to \fIn\fR seconds (default 3).
173 .TP
174 .B debug
175 Enables connection debugging facilities.
176 If this option is given, pppd will log the contents of all
177 control packets sent or received in a readable form.  The packets are
178 logged through syslog with facility \fIdaemon\fR and level
179 \fIdebug\fR.  This information can be directed to a file by setting up
180 /etc/syslog.conf appropriately (see syslog.conf(5)).
181 .TP
182 .B default-asyncmap
183 Disable asyncmap negotiation, forcing all control characters to be
184 escaped for both the transmit and the receive direction.
185 .TP
186 .B default-mru
187 Disable MRU [Maximum Receive Unit] negotiation.  With this option,
188 pppd will use the default MRU value of 1500 bytes for both the
189 transmit and receive direction.
190 .TP
191 .B deflate \fInr,nt
192 Request that the peer compress packets that it sends, using the
193 Deflate scheme, with a maximum window size of \fI2**nr\fR bytes, and
194 agree to compress packets sent to the peer with a maximum window size
195 of \fI2**nt\fR bytes.  If \fInt\fR is not specified, it defaults to
196 the value given for \fInr\fR.  Values in the range 8 to 15 may be used
197 for \fInr\fR and \fInt\fR; larger values give better compression but
198 consume more kernel memory for compression dictionaries.
199 Alternatively, a value of 0 for \fInr\fR or \fInt\fR disables
200 compression in the corresponding direction.  Use \fInodeflate\fR or
201 \fIdeflate 0\fR to disable Deflate compression entirely.  (Note: pppd
202 requests Deflate compression in preference to BSD-Compress if the peer
203 can do either.)
204 .TP
205 .B demand
206 Initiate the link only on demand, i.e. when data traffic is present.
207 With this option, the remote IP address must be specified by the user
208 on the command line or in an options file.  Pppd will initially
209 configure the interface and enable it for IP traffic without
210 connecting to the peer.  When traffic is available, pppd will
211 connect to the peer and perform negotiation, authentication, etc.
212 When this is completed, pppd will commence passing data packets
213 (i.e., IP packets) across the link.
214
215 The \fIdemand\fR option implies the \fIpersist\fR option.  If this
216 behaviour is not desired, use the \fInopersist\fR option after the
217 \fIdemand\fR option.  The \fIidle\fR and \fIholdoff\fR
218 options are also useful in conjuction with the \fIdemand\fR option.
219 .TP
220 .B domain \fId
221 Append the domain name \fId\fR to the local host name for authentication
222 purposes.  For example, if gethostname() returns the name porsche, but
223 the fully qualified domain name is porsche.Quotron.COM, you could
224 specify \fIdomain Quotron.COM\fR.  Pppd would then use the name
225 \fIporsche.Quotron.COM\fR for looking up secrets in the secrets file,
226 and as the default name to send to the peer when authenticating itself
227 to the peer.  This option is privileged.
228 .TP
229 .B holdoff \fIn
230 Specifies how many seconds to wait before re-initiating the link after
231 it terminates.  This option only has any effect if the \fIpersist\fR
232 or \fIdemand\fR option is used.  The holdoff period is not applied if
233 the link was terminated because it was idle.
234 .TP
235 .B idle \fIn
236 Specifies that pppd should disconnect if the link is idle for \fIn\fR
237 seconds.  The link is idle when no data packets (i.e. IP packets) are
238 being sent or received.  Note: it is not advisable to use this option
239 with the \fIpersist\fR option without the \fIdemand\fR option.
240 .TP
241 .B ipcp-accept-local
242 With this option, pppd will accept the peer's idea of our local IP
243 address, even if the local IP address was specified in an option.
244 .TP
245 .B ipcp-accept-remote
246 With this option, pppd will accept the peer's idea of its (remote) IP
247 address, even if the remote IP address was specified in an option.
248 .TP
249 .B ipcp-max-configure \fIn
250 Set the maximum number of IPCP configure-request transmissions to
251 \fIn\fR (default 10).
252 .TP
253 .B ipcp-max-failure \fIn
254 Set the maximum number of IPCP configure-NAKs returned before starting
255 to send configure-Rejects instead to \fIn\fR (default 10).
256 .TP
257 .B ipcp-max-terminate \fIn
258 Set the maximum number of IPCP terminate-request transmissions to
259 \fIn\fR (default 3).
260 .TP
261 .B ipcp-restart \fIn
262 Set the IPCP restart interval (retransmission timeout) to \fIn\fR
263 seconds (default 3).
264 .TP
265 .B ipparam \fIstring
266 Provides an extra parameter to the ip-up and ip-down scripts.  If this
267 option is given, the \fIstring\fR supplied is given as the 6th
268 parameter to those scripts.
269 .TP
270 .B ipx
271 Enable the IPXCP and IPX protocols.  This option is presently only
272 supported under Linux, and only if your kernel has been configured to
273 include IPX support.
274 .TP
275 .B ipx-network \fIn
276 Set the IPX network number in the IPXCP configure request frame to
277 \fIn\fR, a hexadecimal number (without a leading 0x).  There is no
278 valid default.  If this option is not specified, the network number is
279 obtained from the peer.  If the peer does not have the network number,
280 the IPX protocol will not be started.
281 .TP
282 .B ipx-node \fIn\fB:\fIm
283 Set the IPX node numbers. The two node numbers are separated from each
284 other with a colon character. The first number \fIn\fR is the local
285 node number. The second number \fIm\fR is the peer's node number. Each
286 node number is a hexadecimal number, at most 10 digits long. The node
287 numbers on the ipx-network must be unique. There is no valid
288 default. If this option is not specified then the node numbers are
289 obtained from the peer.
290 .TP
291 .B ipx-router-name \fI<string>
292 Set the name of the router. This is a string and is sent to the peer
293 as information data.
294 .TP
295 .B ipx-routing \fIn
296 Set the routing protocol to be received by this option. More than one
297 instance of \fIipx-routing\fR may be specified. The '\fInone\fR'
298 option (0) may be specified as the only instance of ipx-routing. The
299 values may be \fI0\fR for \fINONE\fR, \fI2\fR for \fIRIP/SAP\fR, and
300 \fI4\fR for \fINLSP\fR.
301 .TP
302 .B ipxcp-accept-local
303 Accept the peer's NAK for the node number specified in the ipx-node
304 option. If a node number was specified, and non-zero, the default is
305 to insist that the value be used. If you include this option then you
306 will permit the peer to override the entry of the node number.
307 .TP
308 .B ipxcp-accept-network
309 Accept the peer's NAK for the network number specified in the
310 ipx-network option. If a network number was specified, and non-zero, the
311 default is to insist that the value be used. If you include this
312 option then you will permit the peer to override the entry of the node
313 number.
314 .TP
315 .B ipxcp-accept-remote
316 Use the peer's network number specified in the configure request
317 frame. If a node number was specified for the peer and this option was
318 not specified, the peer will be forced to use the value which you have
319 specified.
320 .TP
321 .B ipxcp-max-configure \fIn
322 Set the maximum number of IPXCP configure request frames which the
323 system will send to \fIn\fR. The default is 10.
324 .TP
325 .B ipxcp-max-failure \fIn
326 Set the maximum number of IPXCP NAK frames which the local system will
327 send before it rejects the options. The default value is 3.
328 .TP
329 .B ipxcp-max-terminate \fIn
330 Set the maximum nuber of IPXCP terminate request frames before the
331 local system considers that the peer is not listening to them. The
332 default value is 3.
333 .TP
334 .B kdebug \fIn
335 Enable debugging code in the kernel-level PPP driver.  The argument
336 \fIn\fR is a number which is the sum of the following values: 1 to
337 enable general debug messages, 2 to request that the contents of
338 received packets be printed, and 4 to request that the contents of
339 transmitted packets be printed.  On most systems, messages printed by
340 the kernel are logged by syslog(1) to a file as directed in the
341 /etc/syslog.conf configuration file.
342 .TP
343 .B lcp-echo-failure \fIn
344 If this option is given, pppd will presume the peer to be dead
345 if \fIn\fR LCP echo-requests are sent without receiving a valid LCP
346 echo-reply.  If this happens, pppd will terminate the
347 connection.  Use of this option requires a non-zero value for the
348 \fIlcp-echo-interval\fR parameter.  This option can be used to enable
349 pppd to terminate after the physical connection has been broken
350 (e.g., the modem has hung up) in situations where no hardware modem
351 control lines are available.
352 .TP
353 .B lcp-echo-interval \fIn
354 If this option is given, pppd will send an LCP echo-request frame to
355 the peer every \fIn\fR seconds.  Normally the peer should respond to
356 the echo-request by sending an echo-reply.  This option can be used
357 with the \fIlcp-echo-failure\fR option to detect that the peer is no
358 longer connected.
359 .TP
360 .B lcp-max-configure \fIn
361 Set the maximum number of LCP configure-request transmissions to
362 \fIn\fR (default 10).
363 .TP
364 .B lcp-max-failure \fIn
365 Set the maximum number of LCP configure-NAKs returned before starting
366 to send configure-Rejects instead to \fIn\fR (default 10).
367 .TP
368 .B lcp-max-terminate \fIn
369 Set the maximum number of LCP terminate-request transmissions to
370 \fIn\fR (default 3).
371 .TP
372 .B lcp-restart \fIn
373 Set the LCP restart interval (retransmission timeout) to \fIn\fR
374 seconds (default 3).
375 .TP
376 .B local
377 Don't use the modem control lines.  With this option, pppd will ignore
378 the state of the CD (Carrier Detect) signal from the modem and will
379 not change the state of the DTR (Data Terminal Ready) signal.
380 .TP
381 .B login
382 Use the system password database for authenticating the peer using
383 PAP, and record the user in the system wtmp file.  Note that the peer
384 must have an entry in the /etc/ppp/pap-secrets file as well as the
385 system password database to be allowed access.
386 .TP
387 .B maxconnect \fIn
388 Terminate the connection when it has been available for network
389 traffic for \fIn\fR seconds (i.e. \fIn\fR seconds after the first
390 network control protocol comes up).
391 .TP
392 .B modem
393 Use the modem control lines.  This option is the default.  With this
394 option, pppd will wait for the CD (Carrier Detect) signal from the
395 modem to be asserted when opening the serial device (unless a connect
396 script is specified), and it will drop the DTR (Data Terminal Ready)
397 signal briefly when the connection is terminated and before executing
398 the connect script.  On Ultrix, this option implies hardware flow
399 control, as for the \fIcrtscts\fR option.
400 .TP
401 .B ms-dns \fI<addr>
402 If pppd is acting as a server for Microsoft Windows clients, this
403 option allows pppd to supply one or two DNS (Domain Name Server)
404 addresses to the clients.  The first instance of this option specifies
405 the primary DNS address; the second instance (if given) specifies the
406 secondary DNS address.  (This option was present in some older
407 versions of pppd under the name \fBdns-addr\fR.)
408 .TP
409 .B ms-wins \fI<addr>
410 If pppd is acting as a server for Microsoft Windows or "Samba"
411 clients, this option allows pppd to supply one or two WINS (Windows
412 Internet Name Services) server addresses to the clients.  The first
413 instance of this option specifies the primary WINS address; the second
414 instance (if given) specifies the secondary WINS address.
415 .TP
416 .B name \fIname
417 Set the name of the local system for authentication purposes to
418 \fIname\fR.  This is a privileged option.  With this option, pppd will
419 use lines in the secrets files which have \fIname\fR as the second
420 field when looking for a secret to use in authenticating the peer.  In
421 addition, unless overridden with the \fIuser\fR option, \fIname\fR
422 will be used as the name to send to the peer when authenticating the
423 local system to the peer.  (Note that pppd does not append the domain
424 name to \fIname\fR.)
425 .TP
426 .B netmask \fIn
427 Set the interface netmask to \fIn\fR, a 32 bit netmask in "decimal dot"
428 notation (e.g. 255.255.255.0).  If this option is given, the value
429 specified is ORed with the default netmask.  The default netmask is
430 chosen based on the negotiated remote IP address; it is the
431 appropriate network mask for the class of the remote IP address, ORed
432 with the netmasks for any non point-to-point network interfaces in the
433 system which are on the same network.
434 .TP
435 .B noaccomp
436 Disable Address/Control compression in both directions (send and
437 receive).
438 .TP
439 .B noauth
440 Do not require the peer to authenticate itself.  This option is
441 privileged if the \fIauth\fR option is specified in /etc/ppp/options.
442 .TP
443 .B nobsdcomp
444 Disables BSD-Compress compression; \fBpppd\fR will not request or
445 agree to compress packets using the BSD-Compress scheme.
446 .TP
447 .B noccp
448 Disable CCP (Compression Control Protocol) negotiation.  This option
449 should only be required if the peer is buggy and gets confused by
450 requests from pppd for CCP negotiation.
451 .TP
452 .B nocrtscts
453 Disable hardware flow control (i.e. RTS/CTS) on the serial port.  If
454 neither the \fIcrtscts\fR nor the \fInocrtscts\fR option is given,
455 the hardware flow control setting for the serial port is left
456 unchanged.
457 .TP
458 .B nodefaultroute
459 Disable the \fIdefaultroute\fR option.  The system administrator who
460 wishes to prevent users from creating default routes with pppd
461 can do so by placing this option in the /etc/ppp/options file.
462 .TP
463 .B nodeflate
464 Disables Deflate compression; pppd will not request or agree to
465 compress packets using the Deflate scheme.
466 .TP
467 .B nodetach
468 Don't detach from the controlling terminal.  Without this option, if a
469 serial device other than the terminal on the standard input is
470 specified, pppd will fork to become a background process.
471 .TP
472 .B noip
473 Disable IPCP negotiation and IP communication.  This option should
474 only be required if the peer is buggy and gets confused by requests
475 from pppd for IPCP negotiation.
476 .TP
477 .B noipdefault
478 Disables the default behaviour when no local IP address is specified,
479 which is to determine (if possible) the local IP address from the
480 hostname.  With this option, the peer will have to supply the local IP
481 address during IPCP negotiation (unless it specified explicitly on the
482 command line or in an options file).
483 .TP
484 .B noipx
485 Disable the IPXCP and IPX protocols.  This option should only be
486 required if the peer is buggy and gets confused by requests from pppd
487 for IPXCP negotiation.
488 .TP
489 .B nomagic
490 Disable magic number negotiation.  With this option, pppd cannot
491 detect a looped-back line.  This option should only be needed if the
492 peer is buggy.
493 .TP
494 .B nopcomp
495 Disable protocol field compression negotiation in both the receive and
496 the transmit direction.
497 .TP
498 .B nopersist
499 Exit once a connection has been made and terminated.  This is the
500 default unless the \fIpersist\fR or \fIdemand\fR option has been
501 specified.
502 .TP
503 .B nopredictor1
504 Do not accept or agree to Predictor-1 comprssion.
505 .TP
506 .B noproxyarp
507 Disable the \fIproxyarp\fR option.  The system administrator who
508 wishes to prevent users from creating proxy ARP entries with pppd can
509 do so by placing this option in the /etc/ppp/options file.
510 .TP
511 .B novj
512 Disable Van Jacobson style TCP/IP header compression in both the
513 transmit and the receive direction.
514 .TP
515 .B novjccomp
516 Disable the connection-ID compression option in Van Jacobson style
517 TCP/IP header compression.  With this option, pppd will not omit the
518 connection-ID byte from Van Jacobson compressed TCP/IP headers, nor
519 ask the peer to do so.
520 .TP
521 .B papcrypt
522 Indicates that all secrets in the /etc/ppp/pap-secrets file which are
523 used for checking the identity of the peer are encrypted, and thus
524 pppd should not accept a password which, before encryption, is
525 identical to the secret from the /etc/ppp/pap-secrets file.
526 .TP
527 .B pap-max-authreq \fIn
528 Set the maximum number of PAP authenticate-request transmissions to
529 \fIn\fR (default 10).
530 .TP
531 .B pap-restart \fIn
532 Set the PAP restart interval (retransmission timeout) to \fIn\fR
533 seconds (default 3).
534 .TP
535 .B pap-timeout \fIn
536 Set the maximum time that pppd will wait for the peer to authenticate
537 itself with PAP to \fIn\fR seconds (0 means no limit).
538 .TP
539 .B persist
540 Do not exit after a connection is terminated; instead try to reopen
541 the connection.
542 .TP
543 .B predictor1
544 Request that the peer compress frames that it sends using Predictor-1
545 compression, and agree to compress transmitted frames with Predictor-1
546 if requested.  This option has no effect unless the kernel driver
547 supports Predictor-1 compression.
548 .TP
549 .B proxyarp
550 Add an entry to this system's ARP [Address Resolution Protocol] table
551 with the IP address of the peer and the Ethernet address of this
552 system.  This will have the effect of making the peer appear to other
553 systems to be on the local ethernet.
554 .TP
555 .B remotename \fIname
556 Set the assumed name of the remote system for authentication purposes
557 to \fIname\fR.
558 .TP
559 .B refuse-chap
560 With this option, pppd will not agree to authenticate itself to the
561 peer using CHAP.
562 .TP
563 .B refuse-pap
564 With this option, pppd will not agree to authenticate itself to the
565 peer using PAP.
566 .TP
567 .B require-chap
568 Require the peer to authenticate itself using CHAP [Challenge
569 Handshake Authentication Protocol] authentication.
570 .TP
571 .B require-pap
572 Require the peer to authenticate itself using PAP [Password
573 Authentication Protocol] authentication.
574 .TP
575 .B silent
576 With this option, pppd will not transmit LCP packets to initiate a
577 connection until a valid LCP packet is received from the peer (as for
578 the `passive' option with ancient versions of pppd).
579 .TP
580 .B usehostname
581 Enforce the use of the hostname (with domain name appended, if given)
582 as the name of the local system for authentication purposes (overrides
583 the \fIname\fR option).
584 .TP
585 .B user \fIname
586 Sets the name used for authenticating the local system to the peer to
587 \fIname\fR.
588 .TP
589 .B vj-max-slots \fIn
590 Sets the number of connection slots to be used by the Van Jacobson
591 TCP/IP header compression and decompression code to \fIn\fR, which
592 must be between 2 and 16 (inclusive).
593 .TP
594 .B welcome \fIscript
595 Run the executable or shell command specified by \fIscript\fR before
596 initiating PPP negotiation, after the connect script (if any) has
597 completed.  This option is privileged if the \fInoauth\fR option is
598 used.
599 .TP
600 .B xonxoff
601 Use software flow control (i.e. XON/XOFF) to control the flow of data on
602 the serial port.
603 .SH OPTIONS FILES
604 Options can be taken from files as well as the command line.  Pppd
605 reads options from the files /etc/ppp/options, ~/.ppprc and
606 /etc/ppp/options.\fIttyname\fR (in that order) before processing the
607 options on the command line.  (In fact, the command-line options are
608 scanned to find the terminal name before the options.\fIttyname\fR
609 file is read.)  In forming the name of the options.\fIttyname\fR file,
610 the initial /dev/ is removed from the terminal name, and any remaining
611 / characters are replaced with dots.
612 .PP
613 An options file is parsed into a series of words, delimited by
614 whitespace.  Whitespace can be included in a word by enclosing the
615 word in quotes (").  A backslash (\\) quotes the following character.
616 A hash (#) starts a comment, which continues until the end of the
617 line.  There is no restriction on using the \fIfile\fR or \fIcall\fR
618 options within an options file.
619 .SH SECURITY
620 .I pppd
621 provides system administrators with sufficient access control that PPP
622 access to a server machine can be provided to legitimate users without
623 fear of compromising the security of the server or the network it's
624 on.  In part this is provided by the /etc/ppp/options file, where the
625 administrator can place options to restrict the ways in which pppd can
626 be used, and in part by the PAP and CHAP secrets files, where the
627 administrator can restrict the set of IP addresses which individual
628 users may use.
629 .PP
630 The normal way that pppd should be set up is to have the \fIauth\fR
631 option in the /etc/ppp/options file.  (This may become the default in
632 later releases.)  If users wish to use pppd to dial out to a peer
633 which will refuse to authenticate itself (such as an internet service
634 provider), the system administrator should create an options file
635 under /etc/ppp/peers containing the \fInoauth\fR option, the name of
636 the serial port to use, and the \fIconnect\fR option (if required),
637 plus any other appropriate options.  In this way, pppd can be set up
638 to allow non-privileged users to make unauthenticated connections only
639 to trusted peers.
640 .PP
641 As indicated above, some security-sensitive options are privileged,
642 which means that they may not be used by an ordinary non-privileged
643 user running a setuid-root pppd, either on the command line, in the
644 user's ~/.ppprc file, or in an options file read using the \fIfile\fR
645 option.  Privileged options may be used in /etc/ppp/options file or in
646 an options file read using the \fIcall\fR option.  If pppd is being
647 run by the root user, privileged options can be used without
648 restriction.
649 .SH AUTHENTICATION
650 Authentication is the process whereby one peer convinces the other of
651 its identity.  This involves the first peer sending its name to the
652 other, together with some kind of secret information which could only
653 come from the genuine authorized user of that name.  In such an
654 exchange, we will call the first peer the "client" and the other the
655 "server".  The client has a name by which it identifies itself to the
656 server, and the server also has a name by which it identifies itself
657 to the client.  Generally the genuine client shares some secret (or
658 password) with the server, and authenticates itself by proving that it
659 knows that secret.  Very often, the names used for authentication
660 correspond to the internet hostnames of the peers, but this is not
661 essential.
662 .LP
663 At present, pppd supports two authentication protocols: the Password
664 Authentication Protocol (PAP) and the Challenge Handshake
665 Authentication Protocol (CHAP).  PAP involves the client sending its
666 name and a cleartext password to the server to authenticate itself.
667 In contrast, the server initiates the CHAP authentication exchange by
668 sending a challenge to the client (the challenge packet includes the
669 server's name).  The client must respond with a response which
670 includes its name plus a hash value derived from the shared secret and
671 the challenge, in order to prove that it knows the secret.
672 .LP
673 The PPP protocol, being symmetrical, allows both peers to require the
674 other to authenticate itself.  In that case, two separate and
675 independent authentication exchanges will occur.  The two exchanges
676 could use different authentication protocols, and in principle,
677 different names could be used in the two exchanges.
678 .LP
679 The default behaviour of pppd is to agree to authenticate if
680 requested, and to not require authentication from the peer.  However,
681 pppd will not agree to authenticate itself with a particular protocol
682 if it has no secrets which could be used to do so.
683 .LP
684 Pppd stores secrets for use in authentication in secrets
685 files (/etc/ppp/pap-secrets for PAP, /etc/ppp/chap-secrets for CHAP).
686 Both secrets files have the same format.  The secrets files can
687 contain secrets for pppd to use in authenticating itself to other
688 systems, as well as secrets for pppd to use when authenticating other
689 systems to itself.
690 .LP
691 Each line in a secrets file contains one secret.  A given secret is
692 specific to a particular combination of client and server - it can
693 only be used by that client to authenticate itself to that server.
694 Thus each line in a secrets file has at least 3 fields: the name of
695 the client, the name of the server, and the secret.  These fields may
696 be followed by a list of the IP addresses that the specified client
697 may use when connecting to the specified server.
698 .LP
699 A secrets file is parsed into words as for a options file, so the
700 client name, server name and secrets fields must each be one word,
701 with any embedded spaces or other special characters quoted or
702 escaped.  Any following words on the same line are taken to be a list
703 of acceptable IP addresses for that client.  If there are only 3 words
704 on the line, or if the first word is "-", then all IP addresses are
705 disallowed.  To allow any address, use "*".
706 A word starting with "!" indicates that the
707 specified address is \fInot\fR acceptable.  An address may be followed
708 by "/" and a number \fIn\fR, to indicate a whole subnet, i.e. all
709 addresses which have the same value in the most significant \fIn\fR
710 bits.  Note that case is significant in the client and server names
711 and in the secret.
712 .LP
713 If the secret starts with an `@', what follows is assumed to be the
714 name of a file from which to read the secret.  A "*" as the client or
715 server name matches any name.  When selecting a secret, pppd takes the
716 best match, i.e.  the match with the fewest wildcards.
717 .LP
718 Thus a secrets file contains both secrets for use in authenticating
719 other hosts, plus secrets which we use for authenticating ourselves to
720 others.  When pppd is authenticating the peer (checking the peer's
721 identity), it chooses a secret with the peer's name in the first
722 field and the name of the local system in the second field.  The
723 name of the local system defaults to the hostname, with the domain
724 name appended if the \fIdomain\fR option is used.  This default can be
725 overridden with the \fIname\fR option, except when the
726 \fIusehostname\fR option is used.
727 .LP
728 When pppd is choosing a secret to use in authenticating itself to the
729 peer, it first determines what name it is going to use to identify
730 itself to the peer.  This name can be specified by the user with the
731 \fIuser\fR option.  If this option is not used, the name defaults to
732 the name of the local system, determined as described in the previous
733 paragraph.  Then pppd looks for a secret with this name in the first
734 field and the peer's name in the second field.  Pppd will know the
735 name of the peer if CHAP authentication is being used, because the
736 peer will have sent it in the challenge packet.  However, if PAP is being
737 used, pppd will have to determine the peer's name from the options
738 specified by the user.  The user can specify the peer's name directly
739 with the \fIremotename\fR option.  Otherwise, if the remote IP address
740 was specified by a name (rather than in numeric form), that name will
741 be used as the peer's name.  Failing that, pppd will use the null
742 string as the peer's name.
743 .LP
744 When authenticating the peer with PAP, the supplied password is first
745 compared with the secret from the secrets file.  If the password
746 doesn't match the secret, the password is encrypted using crypt() and
747 checked against the secret again.  Thus secrets for authenticating the
748 peer can be stored in encrypted form if desired.  If the
749 \fIpapcrypt\fR option is given, the first (unencrypted) comparison is
750 omitted, for better security.
751 .LP
752 Furthermore, if the \fIlogin\fR option was specified, the username and
753 password are also checked against the system password database.  Thus,
754 the system administrator can set up the pap-secrets file to allow PPP
755 access only to certain users, and to restrict the set of IP addresses
756 that each user can use.  Typically, when using the \fIlogin\fR option,
757 the secret in /etc/ppp/pap-secrets would be "", which will match any
758 password supplied by the peer.  This avoids the need to have the same
759 secret in two places.
760 .LP
761 Authentication must be satisfactorily completed before IPCP (or any
762 other Network Control Protocol) can be started.  If the peer is
763 required to authenticate itself, and fails to do so, pppd will
764 terminated the link (by closing LCP).  If IPCP negotiates an
765 unacceptable IP address for the remote host, IPCP will be closed.  IP
766 packets can only be sent or received when IPCP is open.
767 .LP
768 In some cases it is desirable to allow some hosts which can't
769 authenticate themselves to connect and use one of a restricted set of
770 IP addresses, even when the local host generally requires
771 authentication.  If the peer refuses to authenticate itself when
772 requested, pppd takes that as equivalent to authenticating with PAP
773 using the empty string for the username and password.  Thus, by adding
774 a line to the pap-secrets file which specifies the empty string for
775 the client and password, it is possible to allow restricted access to
776 hosts which refuse to authenticate themselves.
777 .SH ROUTING
778 .LP
779 When IPCP negotiation is completed successfully, pppd will inform the
780 kernel of the local and remote IP addresses for the ppp interface.
781 This is sufficient to create a host route to the remote end of the
782 link, which will enable the peers to exchange IP packets.
783 Communication with other machines generally requires further
784 modification to routing tables and/or ARP (Address Resolution
785 Protocol) tables.  In most cases the \fIdefaultroute\fR and/or
786 \fIproxyarp\fR options are sufficient for this, but in some cases
787 further intervention is required.  The /etc/ppp/ip-up script can be
788 used for this.
789 .LP
790 Sometimes it is desirable to add a default route through the remote
791 host, as in the case of a machine whose only connection to the
792 Internet is through the ppp interface.  The \fIdefaultroute\fR option
793 causes pppd to create such a default route when IPCP comes up, and
794 delete it when the link is terminated.
795 .LP
796 In some cases it is desirable to use proxy ARP, for example on a
797 server machine connected to a LAN, in order to allow other hosts to
798 communicate with the remote host.  The \fIproxyarp\fR option causes
799 pppd to look for a network interface on the same subnet as the remote
800 host (an interface supporting broadcast and ARP, which is up and not a
801 point-to-point or loopback interface).  If found, pppd creates a
802 permanent, published ARP entry with the IP address of the remote host
803 and the hardware address of the network interface found.
804 .LP
805 When the \fIdemand\fR option is used, the interface IP addresses have
806 already been set at the point when IPCP comes up.  If pppd has not
807 been able to negotiate the same addresses that it used to configure
808 the interface (for example when the peer is an ISP that uses dynamic
809 IP address assignment), pppd has to change the interface IP addresses
810 to the negotiated addresses.  This may disrupt existing connections,
811 and the use of demand dialling with peers that do dynamic IP address
812 assignment is not recommended.
813 .SH EXAMPLES
814 .LP
815 The following examples assume that the /etc/ppp/options file contains
816 the \fIauth\fR option (as in the default /etc/ppp/options file in the
817 ppp distribution).
818 .LP
819 Probably the most common use of pppd is to dial out to an ISP.  This
820 can be done with a command such as
821 .IP
822 pppd call isp
823 .LP
824 where the /etc/ppp/peers/isp file is set up by the system
825 administrator to contain something like this:
826 .IP
827 ttyS0 19200 crtscts
828 .br
829 connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'
830 .br
831 noauth
832 .LP
833 In this example, we are using chat to dial the ISP's modem and go
834 through any logon sequence required.  The /etc/ppp/chat-isp file
835 contains the script used by chat; it could for example contain
836 something like this:
837 .IP
838 ABORT "NO CARRIER"
839 .br
840 ABORT "NO DIALTONE"
841 .br
842 ABORT "ERROR"
843 .br
844 ABORT "NO ANSWER"
845 .br
846 ABORT "BUSY"
847 .br
848 ABORT "Username/Password Incorrect"
849 .br
850 "" "at"
851 .br
852 OK "at&d0&c1"
853 .br
854 OK "atdt2468135"
855 .br
856 "name:" "^Umyuserid"
857 .br
858 "word:" "\\qmypassword"
859 .br
860 "ispts" "\\q^Uppp"
861 .br
862 "~-^Uppp-~"
863 .LP
864 See the chat(8) man page for details of chat scripts.
865 .LP
866 Pppd can also be used to provide a dial-in ppp service for users.  If
867 the users already have login accounts, the simplest way to set up the
868 ppp service is to let the users log in to their accounts and run pppd
869 (installed setuid-root) with a command such as
870 .IP
871 pppd proxyarp
872 .LP
873 To allow a user to use the PPP facilities, you need to allocate an IP
874 address for that user's machine and create an entry in
875 /etc/ppp/pap-secrets or /etc/ppp/chap-secrets (depending on which
876 authentication method the PPP implementation on the user's machine
877 supports), so that the user's
878 machine can authenticate itself.  For example, if Joe has a machine
879 called "joespc" which is to be allowed to dial in to the machine
880 called "server" and use the IP address joespc.my.net, you would add an
881 entry like this to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets:
882 .IP
883 joespc  server  "joe's secret"  joespc.my.net
884 .LP
885 Alternatively, you can create a username called (for example) "ppp",
886 whose login shell is pppd and whose home directory is /etc/ppp.
887 Options to be used when pppd is run this way can be put in
888 /etc/ppp/.ppprc.
889 .LP
890 If your serial connection is any more complicated than a piece of
891 wire, you may need to arrange for some control characters to be
892 escaped.  In particular, it is often useful to escape XON (^Q) and
893 XOFF (^S), using \fIasyncmap a0000\fR.  If the path includes a telnet,
894 you probably should escape ^] as well (\fIasyncmap 200a0000\fR).  If
895 the path includes an rlogin, you will need to use the \fIescape ff\fR
896 option on the end which is running the rlogin client, since many
897 rlogin implementations are not transparent; they will remove the
898 sequence [0xff, 0xff, 0x73, 0x73, followed by any 8 bytes] from the
899 stream.
900 .SH DIAGNOSTICS
901 .LP
902 Messages are sent to the syslog daemon using facility LOG_DAEMON.
903 (This can be overriden by recompiling pppd with the macro
904 LOG_PPP defined as the desired facility.)  In order to see the error
905 and debug messages, you will need to edit your /etc/syslog.conf file
906 to direct the messages to the desired output device or file.
907 .LP
908 The \fIdebug\fR option causes the contents of all control packets sent
909 or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.
910 This can be useful if the PPP negotiation does not succeed or if
911 authentication fails.
912 If debugging is enabled at compile time, the \fIdebug\fR option also
913 causes other debugging messages to be logged.
914 .LP
915 Debugging can also be enabled or disabled by sending a SIGUSR1 signal
916 to the pppd process.  This signal acts as a toggle.
917 .SH FILES
918 .TP
919 .B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
920 Process-ID for pppd process on ppp interface unit \fIn\fR.
921 .TP
922 .B /etc/ppp/auth-up
923 A program or script which is executed after the remote system
924 successfully authenticates itself.  It is executed with the parameters
925 .IP
926 \fIinterface-name peer-name user-name tty-device speed\fR
927 .IP
928 and with its standard input, output and error redirected to
929 /dev/null.  This program or script is executed with the real and
930 effective user-IDs set to root, and with an empty environment.  (Note
931 that this script is not executed if the peer doesn't authenticate
932 itself, for example when the \fInoauth\fR option is used.)
933 .TP
934 .B /etc/ppp/auth-down
935 A program or script which is executed when the link goes down, if
936 /etc/ppp/auth-up was previously executed.  It is executed in the same
937 manner with the same parameters as /etc/ppp/auth-up.
938 .TP
939 .B /etc/ppp/ip-up
940 A program or script which is executed when the link is available for
941 sending and receiving IP packets (that is, IPCP has come up).  It is
942 executed with the parameters
943 .IP
944 \fIinterface-name tty-device speed local-IP-address
945 remote-IP-address ipparam\fR
946 .IP
947 and with its standard input,
948 output and error streams redirected to /dev/null.
949 .IP
950 This program or script is executed with the real and effective
951 user-IDs set to root.  This is so that it can be used to manipulate
952 routes, run privileged daemons (e.g. \fIsendmail\fR), etc.  Be
953 careful that the contents of the /etc/ppp/ip-up and /etc/ppp/ip-down
954 scripts do not compromise your system's security.
955 .IP
956 This program or script is executed with an empty environment, so you
957 must either specify a PATH or use full pathnames.
958 .TP
959 .B /etc/ppp/ip-down
960 A program or script which is executed when the link is no longer
961 available for sending and receiving IP packets.  This script can be
962 used for undoing the effects of the /etc/ppp/ip-up script.  It is
963 invoked in the same manner and with the same parameters as the ip-up
964 script, and the same security considerations apply.
965 .TP
966 .B /etc/ppp/ipx-up
967 A program or script which is executed when the link is available for
968 sending and receiving IPX packets (that is, IPXCP has come up).  It is
969 executed with the parameters
970 .IP
971 \fIinterface-name tty-device speed network-number local-IPX-node-address
972 remote-IPX-node-address local-IPX-routing-protocol remote-IPX-routing-protocol
973 local-IPX-router-name remote-IPX-router-name ipparam pppd-pid\fR 
974 .IP
975 and with its standard input,
976 output and error streams redirected to /dev/null.
977 .br
978 .IP
979 The local-IPX-routing-protocol and remote-IPX-routing-protocol field
980 may be one of the following:
981 .IP
982 NONE      to indicate that there is no routing protocol
983 .br
984 RIP       to indicate that RIP/SAP should be used
985 .br
986 NLSP      to indicate that Novell NLSP should be used
987 .br
988 RIP NLSP  to indicate that both RIP/SAP and NLSP should be used
989 .br
990 .IP
991 This program or script is executed with the real and effective
992 user-IDs set to root, and with an empty environment.  This is so
993 that it can be used to manipulate routes, run privileged daemons (e.g.
994 \fIripd\fR), etc.  Be careful that the contents of the /etc/ppp/ipx-up
995 and /etc/ppp/ipx-down scripts do not compromise your system's
996 security.
997 .TP
998 .B /etc/ppp/ipx-down
999 A program or script which is executed when the link is no longer
1000 available for sending and receiving IPX packets.  This script can be
1001 used for undoing the effects of the /etc/ppp/ipx-up script.  It is
1002 invoked in the same manner and with the same parameters as the ipx-up
1003 script, and the same security considerations apply.
1004 .TP
1005 .B /etc/ppp/pap-secrets
1006 Usernames, passwords and IP addresses for PAP authentication.  This
1007 file should be owned by root and not readable or writable by any other
1008 user.  Pppd will log a warning if this is not the case.
1009 .TP
1010 .B /etc/ppp/chap-secrets
1011 Names, secrets and IP addresses for CHAP authentication.  As for
1012 /etc/ppp/pap-secrets, this file should be owned by root and not
1013 readable or writable by any other user.  Pppd will log a warning if
1014 this is not the case.
1015 .TP
1016 .B /etc/ppp/options
1017 System default options for pppd, read before user default options or
1018 command-line options.
1019 .TP
1020 .B ~/.ppprc
1021 User default options, read before /etc/ppp/options.\fIttyname\fR.
1022 .TP
1023 .B /etc/ppp/options.\fIttyname
1024 System default options for the serial port being used, read after
1025 ~/.ppprc.  In forming the \fIttyname\fR part of this
1026 filename, an initial /dev/ is stripped from the port name (if
1027 present), and any slashes in the remaining part are converted to
1028 dots.
1029 .TP
1030 .B /etc/ppp/peers
1031 A directory containing options files which may contain privileged
1032 options, even if pppd was invoked by a user other than root.  The
1033 system administrator can create options files in this directory to
1034 permit non-privileged users to dial out without requiring the peer to
1035 authenticate, but only to certain trusted peers.
1036 .SH SEE ALSO
1037 .TP
1038 .B RFC1144
1039 Jacobson, V.
1040 \fICompressing TCP/IP headers for low-speed serial links.\fR
1041 February 1990.
1042 .TP
1043 .B RFC1321
1044 Rivest, R.
1045 .I The MD5 Message-Digest Algorithm.
1046 April 1992.
1047 .TP
1048 .B RFC1332
1049 McGregor, G.
1050 .I PPP Internet Protocol Control Protocol (IPCP).
1051 May 1992.
1052 .TP
1053 .B RFC1334
1054 Lloyd, B.; Simpson, W.A.
1055 .I PPP authentication protocols.
1056 October 1992.
1057 .TP
1058 .B RFC1661
1059 Simpson, W.A.
1060 .I The Point\-to\-Point Protocol (PPP).
1061 July 1994.
1062 .TP
1063 .B RFC1662
1064 Simpson, W.A.
1065 .I PPP in HDLC-like Framing.
1066 July 1994.
1067 .SH NOTES
1068 The following signals have the specified effect when sent to pppd.
1069 .TP
1070 .B SIGINT, SIGTERM
1071 These signals cause pppd to terminate the link (by closing LCP),
1072 restore the serial device settings, and exit.
1073 .TP
1074 .B SIGHUP
1075 This signal causes pppd to terminate the link, restore the serial
1076 device settings, and close the serial device.  If the \fIpersist\fR or
1077 \fIdemand\fR option has been specified, pppd will try to reopen the
1078 serial device and start another connection (after the holdoff period).
1079 Otherwise pppd will exit.  If this signal is received during the
1080 holdoff period, it causes pppd to end the holdoff period immediately.
1081 .TP
1082 .B SIGUSR1
1083 This signal toggles the state of the \fIdebug\fR option.
1084 .TP
1085 .B SIGUSR2
1086 This signal causes pppd to renegotiate compression.  This can be
1087 useful to re-enable compression after it has been disabled as a result
1088 of a fatal decompression error.  (Fatal decompression errors generally
1089 indicate a bug in one or other implementation.)
1090
1091 .SH AUTHORS
1092 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au), based on earlier work by
1093 Drew Perkins,
1094 Brad Clements,
1095 Karl Fox,
1096 Greg Christy,
1097 and
1098 Brad Parker.