6 .Nd Point-to-Point Protocol daemon
13 The Point-to-Point Protocol (PPP) provides a method for transmitting
14 datagrams over serial point-to-point links.
15 PPP is composed of three parts: a method for encapsulating datagrams over
16 serial links, an extensible Link Control Protocol (LCP), and
17 a family of Network Control Protocols (NCP) for establishing
18 and configuring different network-layer protocols.
20 The encapsulation scheme is provided by driver code in the kernel.
22 provides the basic LCP, authentication support, and an NCP for
23 establishing and configuring the Internet Protocol (IP) (called the IP
24 Control Protocol, IPCP).
25 .Ss FREQUENTLY USED OPTIONS
26 .Bl -ohang -offset indent
28 Communicate over the named device.
31 is prepended if necessary.
32 If no device name is given, or if the name of the terminal
33 connected to the standard input is given,
35 will use that terminal, and will not fork to put itself in the
37 This option is privileged if the
48 any speed can be specified, providing that it is
49 supported by the serial device driver.
50 Other systems (e.g. SunOS, Linux) allow only a limited set of speeds.
51 .It Cm active-filter Ar filter-expression
52 Specifies a packet filter to be applied to data packets to determine
53 which packets are to be regarded as link activity, and therefore reset
54 the idle timer, or cause the link to be brought up in demand-dialling
56 This option is useful in conjunction with the
58 option if there are packets being sent or received
59 regularly over the link (for example, routing information packets)
60 which would otherwise prevent the link from ever appearing to be idle.
63 syntax is as described for
65 except that qualifiers which are inappropriate for a PPP link, such as
71 expression should be enclosed in single-quotes to prevent whitespace
72 in the expression from being interpreted by the shell.
73 This option is only available if both the kernel and
78 .It Cm asyncmap Ar map
79 Set the async character map to
81 This map describes which control characters cannot be successfully
82 received over the serial line.
84 will ask the peer to send these characters as a 2-byte
86 The argument is a 32 bit hex number with each bit
87 representing a character to escape.
88 Bit 0 (00000001) represents the character 0x00;
89 bit 31 (80000000) represents the character 0x1f or ^_.
92 options are given, the values are ORed together.
95 option is given, no async character
96 map will be negotiated for the receive direction;
97 the peer should then escape all control characters.
98 To escape transmitted characters, use the
102 Require the peer to authenticate itself before allowing network
103 packets to be sent or received.
105 Read options from the file
106 .Pa /etc/ppp/peers/ Ns Ar name .
107 This file may contain privileged options, such as
111 is not being run by root.
114 string may not begin with
118 as a pathname component.
119 The format of the options file is described below.
120 .It Cm connect Ar script
121 Use the executable or shell command specified by
123 to set up the serial line.
124 This script would typically use the
126 program to dial the modem and start the remote ppp session.
127 This option is privileged if the
130 .It Cm connect-max-attempts Ar number
131 Attempt dial-out connection to remote system no more than specified
135 If the connection is not made,
142 Use hardware flow control (i.e. RTS/CTS) to control the flow of data
148 option is given, the hardware flow control setting
149 for the serial port is left unchanged.
151 Add a default route to the system routing tables, using the peer as
152 the gateway, when IPCP negotiation is successfully completed.
153 This entry is removed when the PPP connection is broken.
154 This option is privileged if the
156 option has been specified.
157 .It Cm disconnect Ar script
158 Run the executable or shell command specified by
162 has terminated the link.
163 This script could, for example, issue commands to the modem to cause
164 it to hang up if hardware modem control signals were not available.
165 The disconnect script is not run if the modem has already hung up.
166 This option is privileged if the
169 .It Cm escape Ar xx,yy,...
170 Specifies that certain characters should be escaped on transmission
171 (regardless of whether the peer requests them to be escaped with its
172 async control character map).
173 The characters to be escaped are specified as a list of hex numbers
175 Note that almost any character can be specified for the
179 option which only allows control characters to be specified.
180 The characters which may not be escaped are those
181 with hex values 0x20 to 0x3f or 0x5e.
183 Read options from file
185 (the format is described below).
186 The file must be readable by the user who has invoked
191 should create a UUCP-style lock file for the
192 serial device to ensure exclusive access to the device.
194 Set the Maximum Receive Unit (MRU) value to
197 will ask the peer to send packets of no more than
200 The minimum MRU value is 128.
201 The default MRU value is 1500.
202 A value of 296 is recommended for slow links
203 (40 bytes for TCP/IP header + 256 bytes of data).
205 Set the Maximum Transmit Unit (MTU) value to
207 Unless the peer requests a smaller value via MRU negotiation,
209 will request that the kernel networking code send data packets of no more
212 bytes through the PPP network interface.
219 will attempt to initiate a connection;
220 if no reply is received from the peer,
222 will then just wait passively for a valid LCP packet from
223 the peer, instead of exiting, as it would without this option.
226 .Bl -ohang -offset indent
227 .It Ar local_IP_address Ns Li : Ns Ar remote_IP_address
228 Set the local and/or remote interface IP addresses.
229 Either one may be omitted.
230 The IP addresses can be specified with a host name or in
231 decimal dot notation (e.g. 150.234.56.78).
233 address is the (first) IP address of the system (unless the
236 The remote address will be obtained from the peer
237 if not specified in any option.
238 Thus, in simple cases, this option is not required.
239 If a local and/or remote IP address is specified with
242 will not accept a different value from the peer in the IPCP
243 negotiation, unless the
244 .Cm ipcp-accept-local
246 .Cm ipcp-accept-remote
247 options are given, respectively.
248 .It Cm bsdcomp Ar nr Ns Li , Ns Ar nt
249 Request that the peer compress packets that it sends, using the
250 BSD-Compress scheme, with a maximum code size of
253 agree to compress packets sent to the peer with a maximum code size of
258 is not specified, it defaults to the value given for
260 Values in the range 9 to 15 may be used for
264 larger values give better compression but
265 consume more kernel memory for compression dictionaries.
266 Alternatively, a value of 0 for
270 disables compression in the corresponding direction.
275 to disable BSD-Compress compression entirely.
276 .It Cm chap-interval Ar number
277 If this option is given,
279 will rechallenge the peer every
282 .It Cm chap-max-challenge Ar number
283 Set the maximum number of CHAP challenge transmissions to
286 .It Cm chap-restart Ar number
287 Set the CHAP restart interval (retransmission timeout for challenges)
293 Enables connection debugging facilities.
294 If this option is given,
296 will log the contents of all
297 control packets sent or received in a readable form.
298 The packets are logged through syslog with facility
302 This information can be directed to a file by setting up
305 .Xr syslog.conf 5 ) .
306 .It Cm default-asyncmap
307 Disable asyncmap negotiation, forcing all control characters to be
308 escaped for both the transmit and the receive direction.
310 Disable Maximum Receive Unit (MRU) negotiation.
313 will use the default MRU value of 1500 bytes for both the
314 transmit and receive direction.
315 .It Cm deflate Ar nr Ns Li , Ns Ar nt
316 Request that the peer compress packets that it sends, using the
317 Deflate scheme, with a maximum window size of
319 bytes, and agree to compress packets sent to the peer with a
320 maximum window size of
325 is not specified, it defaults to the value given for
327 Values in the range 8 to 15 may be used for
331 larger values give better compression but
332 consume more kernel memory for compression dictionaries.
333 Alternatively, a value of 0 for
337 disables compression in the corresponding direction.
342 to disable Deflate compression entirely.
345 requests Deflate compression in preference to BSD-Compress if the peer
348 Initiate the link only on demand, i.e. when data traffic is present.
349 With this option, the remote IP address must be specified by the user
350 on the command line or in an options file.
353 configure the interface and enable it for IP traffic without
354 connecting to the peer.
355 When traffic is available,
357 will connect to the peer and perform negotiation, authentication, etc.
358 When this is completed,
360 will commence passing data packets
361 (i.e. IP packets) across the link.
367 If this behaviour is not desired, use the
376 options are also useful in conjunction with the
379 .It Cm domain Ar name
380 Append the domain name
382 to the local host name for authentication purposes.
383 For example, if gethostname() returns the name
385 but the fully qualified domain name is
386 .Sq porsche.quotron.com ,
388 .Cm domain Li quotron.com .
390 would then use the name
391 .Sq porsche.quotron.com
392 for looking up secrets in the secrets file, and as the default name
393 to send to the peer when authenticating itself to the peer.
394 This option is privileged.
395 .It Cm holdoff Ar number
396 Specifies how many seconds to wait before re-initiating the link after
398 This option only has any effect if the
403 The holdoff period is not applied if
404 the link was terminated because it was idle.
405 .It Cm idle Ar number
408 should disconnect if the link is idle for
411 The link is idle when no data packets (i.e. IP packets) are
412 being sent or received.
415 option is given, data packets which are rejected by the specified
416 activity filter also count as the link being idle.
417 Note: it is not advisable to use this option with the
422 .It Cm ipcp-accept-local
425 will accept the peer's idea of our local IP
426 address, even if the local IP address was specified in an option.
427 .It Cm ipcp-accept-remote
430 will accept the peer's idea of its (remote) IP
431 address, even if the remote IP address was specified in an option.
432 .It Cm ipcp-max-configure Ar number
433 Set the maximum number of IPCP configure-request transmissions to
436 .It Cm ipcp-max-failure Ar number
437 Set the maximum number of IPCP configure-NAKs returned before starting
438 to send configure-Rejects instead to
441 .It Cm ipcp-max-terminate Ar number
442 Set the maximum number of IPCP terminate-request transmissions to
445 .It Cm ipcp-restart Ar number
446 Set the IPCP restart interval (retransmission timeout) to
450 .It Cm ipparam Ar string
451 Provides an extra parameter to the ip-up and ip-down scripts.
452 If this option is given, the
454 supplied is given as the 6th
455 parameter to those scripts.
457 Enable the IPXCP and IPX protocols.
458 This option is presently only supported under Linux, and only if your
459 kernel has been configured to include IPX support.
460 .It Cm ipx-network Ar number
461 Set the IPX network number in the IPXCP configure request frame to
463 a hexadecimal number (without a leading 0x).
464 There is no valid default.
465 If this option is not specified, the network number is
466 obtained from the peer.
467 If the peer does not have the network number,
468 the IPX protocol will not be started.
469 .It Cm ipx-node Ar local Ns Li : Ns Ar remote
470 Set the IPX node numbers.
471 The two node numbers are separated from each
472 other with a colon character.
475 is the local node number.
478 is the peer's node number.
479 Each node number is a hexadecimal number, at most 10 digits long.
480 The node numbers on the ipx-network must be unique.
481 There is no valid default.
482 If this option is not specified then the node numbers are
483 obtained from the peer.
484 .It Cm ipx-router-name Ar string
485 Set the name of the router.
486 This is a string and is sent to the peer
488 .It Cm ipx-routing Ar protocol
489 Set the routing protocol to be received by this option.
490 More than one instance of
493 The values may be 0 for NONE, 2 for IRIP/SAP, and 4 for NLSP.
494 The NONE option may be specified as the only instance of ipx-routing.
495 .It Cm ipxcp-accept-local
496 Accept the peer's NAK for the node number specified in the ipx-node
498 If a node number was specified, and non-zero, the default is
499 to insist that the value be used.
500 If you include this option then you
501 will permit the peer to override the entry of the node number.
502 .It Cm ipxcp-accept-network
503 Accept the peer's NAK for the network number specified in the
505 If a network number was specified, and non-zero, the
506 default is to insist that the value be used.
508 option then you will permit the peer to override the entry of the node
510 .It Cm ipxcp-accept-remote
511 Use the peer's network number specified in the configure request
513 If a node number was specified for the peer and this option was
514 not specified, the peer will be forced to use the value which you have
516 .It Cm ipxcp-max-configure Ar number
517 Set the maximum number of IPXCP configure request frames which the
520 .It Cm ipxcp-max-failure Ar number
521 Set the maximum number of IPXCP NAK frames which the local system will
522 send before it rejects the options.
524 .It Cm ipxcp-max-terminate Ar number
525 Set the maximum number of IPXCP terminate request frames before the
526 local system considers that the peer is not listening to them.
528 .It Cm kdebug Ar level
529 Enable debugging code in the kernel-level PPP driver.
532 is a number which is the sum of the following values: 1 to
533 enable general debug messages, 2 to request that the contents of
534 received packets be printed, and 4 to request that the contents of
535 transmitted packets be printed.
536 On most systems, messages printed by the kernel are logged by
538 to a file as directed in the
541 .It Cm lcp-echo-failure Ar number
542 If this option is given,
544 will presume the peer to be dead if
546 LCP echo-requests are sent without receiving a valid LCP echo-reply.
549 will terminate the connection.
550 Use of this option requires a non-zero value for the
551 .Cm lcp-echo-interval
553 This option can be used to enable
555 to terminate after the physical connection has been broken
556 (e.g., the modem has hung up) in situations where no hardware modem
557 control lines are available.
558 .It Cm lcp-echo-interval Ar number
559 If this option is given,
561 will send an LCP echo-request frame to the peer every
564 Normally the peer should respond to
565 the echo-request by sending an echo-reply.
566 This option can be used
569 option to detect that the peer is no longer connected.
570 .It Cm lcp-max-configure Ar number
571 Set the maximum number of LCP configure-request transmissions to
574 .It Cm lcp-max-failure Ar number
575 Set the maximum number of LCP configure-NAKs returned before starting
576 to send configure-Rejects instead to
579 .It Cm lcp-max-terminate Ar number
580 Set the maximum number of LCP terminate-request transmissions to
583 .It Cm lcp-restart Ar number
584 Set the LCP restart interval (retransmission timeout) to
589 Don't use the modem control lines.
593 the state of the CD (Carrier Detect) signal from the modem and will
594 not change the state of the DTR (Data Terminal Ready) signal.
596 Use the system password database for authenticating the peer using
597 PAP, and record the user in the system wtmp file.
598 Note that the peer must have an entry in the
599 .Pa /etc/ppp/pap-secrets
600 file as well as the system password database to be allowed access.
601 .It Cm maxconnect Ar number
602 Terminate the connection when it has been available for network
607 seconds after the first network control protocol comes up).
609 Use the modem control lines.
610 This option is the default.
613 will wait for the CD (Carrier Detect) signal from the
614 modem to be asserted when opening the serial device (unless a connect
615 script is specified), and it will drop the DTR (Data Terminal Ready)
616 signal briefly when the connection is terminated and before executing
618 On Ultrix, this option implies hardware flow control, as for the
621 .It Cm ms-dns Ar address
624 is acting as a server for Microsoft Windows clients, this
627 to supply one or two DNS (Domain Name Server) addresses to the clients.
628 The first instance of this option specifies the primary DNS address;
629 the second instance (if given) specifies the secondary DNS address.
630 Note: this option was present in some older versions of
634 .It Cm ms-wins Ar address
637 is acting as a server for Microsoft Windows or Samba
638 clients, this option allows
640 to supply one or two WINS (Windows
641 Internet Name Services) server addresses to the clients.
642 The first instance of this option specifies the primary WINS address;
643 the second instance (if given) specifies the secondary WINS address.
645 Set the name of the local system for authentication purposes to
647 This is a privileged option.
650 will use lines in the secrets files which have
653 field when looking for a secret to use in authenticating the peer.
654 In addition, unless overridden with the
658 will be used as the name to send to the peer when authenticating the
659 local system to the peer.
662 does not append the domain name to
664 .It Cm netmask Ar mask
665 Set the interface netmask to
667 a 32 bit netmask in decimal dot notation (e.g. 255.255.255.0).
668 If this option is given, the value
669 specified is ORed with the default netmask.
670 The default netmask is chosen based on the negotiated remote IP address;
672 appropriate network mask for the class of the remote IP address, ORed
673 with the netmasks for any non point-to-point network interfaces in the
674 system which are on the same network.
676 Disable Address/Control compression in both directions (send and
679 Do not require the peer to authenticate itself.
680 This option is privileged if the
682 option is specified in
683 .Pa /etc/ppp/options .
685 Disables BSD-Compress compression;
688 agree to compress packets using the BSD-Compress scheme.
690 Disable Compression Control Protocol (CCP) negotiation.
692 should only be required if the peer is buggy and gets confused by
697 Disable hardware flow control (i.e. RTS/CTS) on the serial port.
702 option is given, the hardware flow control setting for the serial
703 port is left unchanged.
704 .It Cm nodefaultroute
708 The system administrator who
709 wishes to prevent users from creating default routes with
711 can do so by placing this option in the
715 Disables Deflate compression;
717 will not request or agree to compress packets using the Deflate scheme.
719 Don't detach from the controlling terminal.
720 Without this option, if a
721 serial device other than the terminal on the standard input is
724 will fork to become a background process.
726 Disable IPCP negotiation and IP communication.
727 This option should only be required if the peer is buggy and gets
728 confused by requests from
730 for IPCP negotiation.
732 Disables the default behaviour when no local IP address is specified,
733 which is to determine (if possible) the local IP address from the
735 With this option, the peer will have to supply the local IP
736 address during IPCP negotiation (unless it specified explicitly on the
737 command line or in an options file).
739 Disable the IPXCP and IPX protocols.
740 This option should only be
741 required if the peer is buggy and gets confused by requests from
743 for IPXCP negotiation.
745 Disable magic number negotiation.
748 cannot detect a looped-back line.
749 This option should only be needed if the peer is buggy.
751 Disable protocol field compression negotiation in both the receive and
752 the transmit direction.
754 Exit once a connection has been made and terminated.
755 This is the default unless the
759 option has been specified.
761 Do not accept or agree to Predictor-1 compression.
766 The system administrator who
767 wishes to prevent users from creating proxy ARP entries with
769 can do so by placing this option in the
773 Disable Van Jacobson style TCP/IP header compression in both the
774 transmit and the receive direction.
776 Disable the connection-ID compression option in Van Jacobson style
777 TCP/IP header compression.
780 will not omit the connection-ID byte from Van Jacobson compressed
781 TCP/IP headers, nor ask the peer to do so.
783 Indicates that all secrets in the
784 .Pa /etc/ppp/pap-secrets
786 used for checking the identity of the peer are encrypted, and thus
788 should not accept a password which, before encryption, is
789 identical to the secret from the
790 .Pa /etc/ppp/pap-secrets
792 .It Cm pap-max-authreq Ar number
793 Set the maximum number of PAP authenticate-request transmissions to
796 .It Cm pap-restart Ar number
797 Set the PAP restart interval (retransmission timeout) to
801 .It Cm pap-timeout Ar number
802 Set the maximum time that
804 will wait for the peer to authenticate itself with PAP to
806 seconds (0 means no limit).
807 .It Cm pass-filter Ar filter-expression
808 Specifies a packet filter to applied to data packets being sent or
809 received to determine which packets should be allowed to pass.
810 Packets which are rejected by the filter are silently discarded.
812 option can be used to prevent specific network daemons (such as
813 routed) using up link bandwidth, or to provide a basic firewall
816 .Ar filter-expression
817 syntax is as described for
819 except that qualifiers which are inappropriate for a PPP link, such as
822 .Cm arp , are not permitted.
824 expression should be enclosed in single-quotes to prevent whitespace
825 in the expression from being interpreted by the shell.
827 is possible to apply different constraints to incoming and outgoing
833 This option is currently only available under
835 and then only if both the kernel and
841 Do not exit after a connection is terminated; instead try to reopen
844 Request that the peer compress frames that it sends using Predictor-1
845 compression, and agree to compress transmitted frames with Predictor-1
847 This option has no effect unless the kernel driver
848 supports Predictor-1 compression.
850 Add an entry to this system's Address Resolution Protocol (ARP) table
851 with the IP address of the peer and the Ethernet address of this
853 This will have the effect of making the peer appear to other
854 systems to be on the local ethernet.
855 .It Cm remotename Ar name
856 Set the assumed name of the remote system for authentication purposes
862 will not agree to authenticate itself to the peer using CHAP.
866 will not agree to authenticate itself to the peer using PAP.
868 Require the peer to authenticate itself using Challenge
869 Handshake Authentication Protocol (CHAP) authentication.
871 Require the peer to authenticate itself using Password
872 Authentication Protocol (PAP) authentication.
876 will not transmit LCP packets to initiate a connection until
877 a valid LCP packet is received from the peer (as for the
879 option with ancient versions of
882 Enforce the use of the hostname (with domain name appended, if given)
883 as the name of the local system for authentication purposes (overrides
888 Sets the name used for authenticating the local system to the peer to
890 .It Cm vj-max-slots Ar number
891 Sets the number of connection slots to be used by the Van Jacobson
892 TCP/IP header compression and decompression code to
894 which must be between 2 and 16 inclusively.
895 .It Cm welcome Ar script
896 Run the executable or shell command specified by
898 before initiating PPP negotiation, after the connect script
899 (if any) has completed.
900 This option is privileged if the
904 Use software flow control (i.e. XON/XOFF) to control the flow of data on
908 The following signals have the specified effect when sent to
910 .Bl -tag -width ".Dv SIGINT Ns , Dv SIGTERM" -offset indent
911 .It Dv SIGINT Ns , Dv SIGTERM
914 to terminate the link (by closing LCP),
915 restore the serial device settings, and exit.
919 to terminate the link, restore the serial
920 device settings, and close the serial device.
925 option has been specified,
927 will try to reopen the
928 serial device and start another connection (after the holdoff period).
932 If this signal is received during the holdoff period, it causes
934 to end the holdoff period immediately.
936 This signal toggles the state of the
942 to renegotiate compression.
944 useful to re-enable compression after it has been disabled as a result
945 of a fatal decompression error.
946 (Fatal decompression errors generally
947 indicate a bug in one or other implementation.)
951 provides system administrators with sufficient access control that PPP
952 access to a server machine can be provided to legitimate users without
953 fear of compromising the security of the server or the network it's on.
954 In part this is provided by the
956 file, where the administrator can place options to restrict the ways in which
958 can be used, and in part by the PAP and CHAP secrets files, where the
959 administrator can restrict the set of IP addresses which individual
964 should be set up is to have the
969 (This may become the default in later releases.)
972 to dial out to a peer which will refuse to authenticate itself
973 (such as an internet service provider), the system administrator
974 should create an options file under
978 option, the name of the serial port to use, and the
980 option (if required), plus any other appropriate options.
984 to allow non-privileged users to make unauthenticated connections only
987 As indicated above, some security-sensitive options are privileged,
988 which means that they may not be used by an ordinary non-privileged
989 user running a setuid-root
991 either on the command line, in the user's
993 file, or in an options file read using the
996 Privileged options may be used in
998 file or in an options file read using the
1003 is being run by the root user, privileged options can be used without
1006 Authentication is the process whereby one peer convinces the other of
1008 This involves the first peer sending its name to the
1009 other, together with some kind of secret information which could only
1010 come from the genuine authorized user of that name.
1012 exchange, we will call the first peer the
1016 The client has a name by which it identifies itself to the
1017 server, and the server also has a name by which it identifies itself
1019 Generally the genuine client shares some secret (or
1020 password) with the server, and authenticates itself by proving that it
1022 Very often, the names used for authentication
1023 correspond to the internet hostnames of the peers, but this is not
1028 supports two authentication protocols: the Password
1029 Authentication Protocol (PAP) and the Challenge Handshake
1030 Authentication Protocol (CHAP).
1031 PAP involves the client sending its
1032 name and a cleartext password to the server to authenticate itself.
1033 In contrast, the server initiates the CHAP authentication exchange by
1034 sending a challenge to the client (the challenge packet includes the
1036 The client must respond with a response which
1037 includes its name plus a hash value derived from the shared secret and
1038 the challenge, in order to prove that it knows the secret.
1040 The PPP protocol, being symmetrical, allows both peers to require the
1041 other to authenticate itself.
1042 In that case, two separate and
1043 independent authentication exchanges will occur.
1045 could use different authentication protocols, and in principle,
1046 different names could be used in the two exchanges.
1048 The default behaviour of
1050 is to agree to authenticate if
1051 requested, and to not require authentication from the peer.
1054 will not agree to authenticate itself with a particular protocol
1055 if it has no secrets which could be used to do so.
1058 stores secrets for use in authentication in secrets
1060 .Pa /etc/ppp/pap-secrets
1062 .Pa /etc/ppp/chap-secrets
1064 Both secrets files have the same format.
1065 The secrets files can contain secrets for
1067 to use in authenticating itself to other
1068 systems, as well as secrets for
1070 to use when authenticating other systems to itself.
1072 Each line in a secrets file contains one secret.
1074 specific to a particular combination of client and server \(em it can
1075 only be used by that client to authenticate itself to that server.
1076 Thus each line in a secrets file has at least 3 fields: the name of
1077 the client, the name of the server, and the secret.
1079 be followed by a list of the IP addresses that the specified client
1080 may use when connecting to the specified server.
1082 A secrets file is parsed into words as for an options file, so the
1083 client name, server name and secrets fields must each be one word,
1084 with any embedded spaces or other special characters quoted or
1086 Any following words on the same line are taken to be a list
1087 of acceptable IP addresses for that client, or an
1090 addresses (the same format used on the
1091 command line or in the options file) when on a line that contains a
1092 specific client name (not a wildcard nor empty).
1093 If there are only 3 words
1094 on the line, or if the first word is
1096 then all IP addresses are disallowed.
1097 To allow any address, use
1099 A word starting with
1101 indicates that the specified address is not acceptable.
1102 An address may be followed by
1106 to indicate a whole subnet, i.e. all addresses which have the same
1107 value in the most significant
1110 Note that case is significant in the client and server names
1113 If the secret starts with an
1115 what follows is assumed to be the
1116 name of a file from which to read the secret.
1119 as the client or server name matches any name.
1120 When selecting a secret,
1122 takes the best match, i.e. the match with the fewest wildcards.
1124 Thus a secrets file contains both secrets for use in authenticating
1125 other hosts, plus secrets which we use for authenticating ourselves to
1129 is authenticating the peer (checking the peer's
1130 identity), it chooses a secret with the peer's name in the first
1131 field and the name of the local system in the second field.
1132 The name of the local system defaults to the hostname, with the domain
1133 name appended if the
1136 This default can be overridden with the
1138 option, except when the
1144 is choosing a secret to use in authenticating itself to the
1145 peer, it first determines what name it is going to use to identify
1147 This name can be specified by the user with the
1150 If this option is not used, the name defaults to
1151 the name of the local system, determined as described in the previous
1155 looks for a secret with this name in the first
1156 field and the peer's name in the second field.
1159 name of the peer if CHAP authentication is being used, because the
1160 peer will have sent it in the challenge packet.
1161 However, if PAP is being used,
1163 will have to determine the peer's name from the options
1164 specified by the user.
1165 The user can specify the peer's name directly with the
1168 Otherwise, if the remote IP address
1169 was specified by a name (rather than in numeric form), that name will
1170 be used as the peer's name.
1173 will use the null string as the peer's name.
1175 When authenticating the peer with PAP, the supplied password is first
1176 compared with the secret from the secrets file.
1178 doesn't match the secret, the password is encrypted using
1180 and checked against the secret again.
1181 Thus secrets for authenticating the
1182 peer can be stored in encrypted form if desired.
1185 option is given, the first (unencrypted) comparison is
1186 omitted, for better security.
1190 option was specified, the username and
1191 password are also checked against the system password database.
1193 the system administrator can set up the pap-secrets file to allow PPP
1194 access only to certain users, and to restrict the set of IP addresses
1195 that each user can use.
1196 Typically, when using the
1198 option, the secret in
1199 .Pa /etc/ppp/pap-secrets
1202 which will match any password supplied by the peer.
1203 This avoids the need to have the same secret in two places.
1205 Additional checks are performed when the
1209 .Pa /etc/ppp/ppp.deny
1210 exists, and the user is listed in it, the authentication fails.
1212 .Pa /etc/ppp/ppp.shells
1214 the user's normal login shell is not listed, the authentication fails.
1216 Authentication must be satisfactorily completed before IPCP (or any
1217 other Network Control Protocol) can be started.
1218 If the peer is required to authenticate itself, and fails to do so,
1220 will terminated the link (by closing LCP).
1221 If IPCP negotiates an unacceptable IP address for the remote host,
1222 IPCP will be closed.
1223 IP packets can only be sent or received when IPCP is open.
1225 In some cases it is desirable to allow some hosts which can't
1226 authenticate themselves to connect and use one of a restricted set of
1227 IP addresses, even when the local host generally requires
1229 If the peer refuses to authenticate itself when requested,
1231 takes that as equivalent to authenticating with PAP
1232 using the empty string for the username and password.
1234 a line to the pap-secrets file which specifies the empty string for
1235 the client and password, it is possible to allow restricted access to
1236 hosts which refuse to authenticate themselves.
1238 When IPCP negotiation is completed successfully,
1241 kernel of the local and remote IP addresses for the ppp interface.
1242 This is sufficient to create a host route to the remote end of the
1243 link, which will enable the peers to exchange IP packets.
1244 Communication with other machines generally requires further
1245 modification to routing tables and/or ARP (Address Resolution
1251 options are sufficient for this, but in some cases
1252 further intervention is required.
1255 script can be used for this.
1257 Sometimes it is desirable to add a default route through the remote
1258 host, as in the case of a machine whose only connection to the
1259 Internet is through the ppp interface.
1264 to create such a default route when IPCP comes up, and
1265 delete it when the link is terminated.
1267 In some cases it is desirable to use proxy ARP, for example on a
1268 server machine connected to a LAN, in order to allow other hosts to
1269 communicate with the remote host.
1274 to look for a network interface on the same subnet as the remote
1275 host (an interface supporting broadcast and ARP, which is up and not a
1276 point-to-point or loopback interface).
1280 permanent, published ARP entry with the IP address of the remote host
1281 and the hardware address of the network interface found.
1285 option is used, the interface IP addresses have
1286 already been set at the point when IPCP comes up.
1290 been able to negotiate the same addresses that it used to configure
1291 the interface (for example when the peer is an ISP that uses dynamic
1292 IP address assignment),
1294 has to change the interface IP addresses to the negotiated addresses.
1295 This may disrupt existing connections,
1296 and the use of demand dialling with peers that do dynamic IP address
1297 assignment is not recommended.
1299 The environment variables that
1302 .Bl -tag -width "PEERNAME"
1304 The name of the serial tty device being used.
1306 The name of the network interface being used.
1308 The IP address for the local end of the link.
1309 This is only set when IPCP has come up.
1311 The IP address for the remote end of the link.
1312 This is only set when IPCP has come up.
1314 The authenticated name of the peer.
1315 This is only set if the peer authenticates itself.
1317 The baud rate of the tty device.
1319 The real user-id of the user who invoked
1324 reads options from the files
1325 .Pa /etc/ppp/options ,
1328 .Pa /etc/ppp/options. Ns Ar tty_name
1329 (in that order) before processing the options on the command line.
1330 (In fact, the command-line options are
1331 scanned to find the terminal name before the
1332 .Pa options. Ns Ar tty_name
1335 An options file is parsed into a series of words, delimited by
1337 Whitespace can be included in a word by enclosing the
1338 word in double-quotes (").
1339 A backslash (\\) quotes the following character.
1340 A hash (#) starts a comment, which continues until the end of the line.
1341 There is no restriction on using the
1345 options within an options file.
1346 .Bl -tag -width ".Pa /usr/share/examples/pppd/"
1347 .It Pa /var/run/ppp Ns Ar unit Ns \&.pid
1350 process on ppp interface
1352 .It Pa /etc/ppp/pap-secrets
1353 Usernames, passwords and IP addresses for PAP authentication.
1354 This file should be owned by root and not readable or writable
1357 will log a warning if this is not the case.
1358 .It Pa /etc/ppp/chap-secrets
1359 Names, secrets and IP addresses for CHAP authentication.
1361 .Pa /etc/ppp/pap-secrets ,
1362 this file should be owned by root and not
1363 readable or writable by any other user.
1365 will log a warning if this is not the case.
1366 .It Pa /etc/ppp/options
1367 System default options for
1369 read before user default options or
1370 command-line options.
1372 User default options, read before
1373 .Pa /etc/ppp/options. Ns Ar tty_name .
1374 .It Pa /etc/ppp/options. Ns Ar tty_name
1375 System default options for the serial port being used, read after
1379 part of this filename, an initial
1381 is stripped from the port name (if present), and any slashes in the
1382 remaining part are converted to dots.
1383 .It Pa /etc/ppp/peers
1384 A directory containing options files which may contain privileged
1387 was invoked by a user other than root.
1388 The system administrator can create options files in this directory to
1389 permit non-privileged users to dial out without requiring the peer to
1390 authenticate, but only to certain trusted peers.
1391 .It Pa /etc/ppp/ppp.deny
1392 Lists users who may not use the system password PAP authentication.
1393 .It Pa /etc/ppp/ppp.shells
1394 Lists user shells which are approved for system password PAP authentication
1396 .It Pa /usr/share/examples/pppd/
1399 configuration files.
1403 also invokes scripts at various stages in its processing which can be
1404 used to perform site-specific ancillary processing.
1406 usually shell scripts, but could be executable code files instead.
1408 does not wait for the scripts to finish.
1410 executed as root (with the real and effective user-id set to 0), so
1411 that they can do things such as update routing tables or run
1413 Be careful that the contents of these scripts do
1414 not compromise your system's security.
1416 runs the scripts with
1417 standard input, output and error redirected to
1420 environment that is empty except for some environment variables that
1421 give information about the link.
1423 invokes the following scripts, if they exist.
1424 It is not an error if they don't exist.
1425 .Bl -tag -width ".Pa /etc/ppp/auth-down"
1426 .It Pa /etc/ppp/auth-up
1427 A program or script which is executed after the remote system
1428 successfully authenticates itself.
1429 It is executed with the following parameters:
1431 .Sy iface-name peer-name user-name tty-dev speed
1433 Note that this script is not executed if the peer doesn't authenticate
1434 itself, for example when the
1437 .It Pa /etc/ppp/auth-down
1438 A program or script which is executed when the link goes down, if
1439 .Pa /etc/ppp/auth-up
1440 was previously executed.
1441 It is executed in the same manner with the same parameters as
1442 .Pa /etc/ppp/auth-up .
1443 .It Pa /etc/ppp/ip-up
1444 A program or script which is executed when the link is available for
1445 sending and receiving IP packets (that is, IPCP has come up).
1446 It is executed with the following parameters:
1448 .Sy iface-name tty-dev speed local-IP remote-IP ipparam
1449 .It Pa /etc/ppp/ip-down
1450 A program or script which is executed when the link is no longer
1451 available for sending and receiving IP packets.
1452 This script can be used for undoing the effects of the
1455 It is invoked in the same manner and with the same parameters.
1456 .It Pa /etc/ppp/ipx-up
1457 A program or script which is executed when the link is available for
1458 sending and receiving IPX packets (that is, IPXCP has come up).
1459 It is executed with the following parameters:
1461 .Sy iface-name tty-dev speed network-number
1462 .Sy local-IPX-node-address remote-IPX-node-address
1463 .Sy local-IPX-routing-proto remote-IPX-routing-proto
1464 .Sy local-IPX-router-name remote-IPX-router-name
1465 .Sy ipparam pppd-pid
1467 The local-IPX-routing-protocol and remote-IPX-routing-protocol field
1468 may be one of the following:
1471 to indicate that there is no routing protocol
1473 to indicate that RIP/SAP should be used
1475 to indicate that Novell NLSP should be used
1477 to indicate that both RIP/SAP and NLSP should be used
1479 .It Pa /etc/ppp/ipx-down
1480 A program or script which is executed when the link is no longer
1481 available for sending and receiving IPX packets.
1482 This script can be used for undoing the effects of the
1485 It is invoked in the same manner and with the same parameters.
1488 The following examples assume that the
1489 .Pa /etc/ppp/options
1492 option (as in the default
1493 .Pa /etc/ppp/options
1494 file in the ppp distribution).
1496 Probably the most common use of
1498 is to dial out to an ISP.
1499 This can be done with a command such as
1500 .Bd -literal -offset indent
1505 .Pa /etc/ppp/peers/isp
1506 file is set up by the system
1507 administrator to contain something like this:
1508 .Bd -literal -offset indent
1510 connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'
1514 In this example, we are using chat to dial the ISP's modem and go
1515 through any logon sequence required.
1517 .Pa /etc/ppp/chat-isp
1518 file contains the script used by chat; it could for example contain
1519 something like this:
1520 .Bd -literal -offset indent
1526 ABORT "Username/Password Incorrect"
1530 "name:" "^Umyuserid"
1531 "word:" "\\qmypassword"
1538 man page for details of chat scripts.
1541 can also be used to provide a dial-in ppp service for users.
1542 If the users already have login accounts, the simplest way to set up the
1543 ppp service is to let the users log in to their accounts and run
1545 (installed setuid-root) with a command such as
1546 .Bd -literal -offset indent
1550 To allow a user to use the PPP facilities, you need to allocate an IP
1551 address for that user's machine and create an entry in
1552 .Pa /etc/ppp/pap-secrets
1554 .Pa /etc/ppp/chap-secrets
1555 (depending on which authentication method the PPP implementation on
1556 the user's machine supports), so that the user's machine can authenticate
1558 For example, if Joe has a machine called
1560 which is to be allowed to dial in to the machine called
1562 and use the IP address
1564 you would add an entry like this to
1565 .Pa /etc/ppp/pap-secrets
1567 .Pa /etc/ppp/chap-secrets :
1568 .Bd -literal -offset indent
1569 joespc server "joe's secret" joespc.my.net
1572 Alternatively, you can create a username called (for example)
1574 whose login shell is
1576 and whose home directory is
1578 Options to be used when
1580 is run this way can be put in
1581 .Pa /etc/ppp/.ppprc .
1583 If your serial connection is any more complicated than a piece of
1584 wire, you may need to arrange for some control characters to be
1586 In particular, it is often useful to escape XON (^Q) and
1588 .Cm asyncmap Li a0000 .
1589 If the path includes a telnet, you probably should escape ^] as well
1590 .Pq Cm asyncmap Li 200a0000 .
1591 If the path includes an rlogin, you will need to use the
1593 option on the end which is running the rlogin client, since many
1594 rlogin implementations are not transparent; they will remove the
1595 sequence [0xff, 0xff, 0x73, 0x73, followed by any 8 bytes] from the
1598 Messages are sent to the syslog daemon using facility
1600 (This can be overridden by recompiling
1604 defined as the desired facility.)
1605 In order to see the error and debug messages, you will need to edit your
1606 .Pa /etc/syslog.conf
1607 file to direct the messages to the desired output device or file.
1611 option causes the contents of all control packets sent
1612 or received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.
1613 This can be useful if the PPP negotiation does not succeed or if
1614 authentication fails.
1615 If debugging is enabled at compile time, the
1617 option also causes other debugging messages to be logged.
1619 Debugging can also be enabled or disabled by sending a
1624 This signal acts as a toggle.
1637 .%T Compressing TCP/IP headers for low-speed serial links
1644 .%T The MD5 Message-Digest Algorithm
1651 .%T PPP Internet Protocol Control Protocol (IPCP)
1659 .%T PPP authentication protocols
1666 .%T The Point-to-Point Protocol (PPP)
1673 .%T PPP in HDLC-like Framing
1679 .An Paul Mackerras Aq Mt Paul.Mackerras@cs.anu.edu.au ,
1680 based on earlier work by