]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/pppd.8
Apply patch for sync serial support from Paul Fulghum.
[ppp.git] / pppd / pppd.8
index 6a891b9a217c68e674a2f6c18ab0e4d672652d71..59e8c0251ff4b07a0e0263ab8891efac1b4c1655 100644 (file)
@@ -1,5 +1,5 @@
 .\" manual page [] for pppd 2.3
-.\" $Id: pppd.8,v 1.26 1997/04/30 05:56:22 paulus Exp $
+.\" $Id: pppd.8,v 1.38 1999/03/30 06:33:09 paulus Exp $
 .\" SH section heading
 .\" SS subsection heading
 .\" LP paragraph
@@ -35,32 +35,16 @@ Control Protocol, IPCP).
 .I <tty_name>
 Communicate over the named device.  The string "/dev/" is prepended if
 necessary.  If no device name is given, or if the name of the terminal
-connected to the standard input is given, pppd
-will use that terminal, and will not fork to put itself in the
-background.  This option is privileged if the \fInoauth\fR option is
-used.
+connected to the standard input is given, pppd will use that terminal,
+and will not fork to put itself in the background.  A value for this
+option from a privileged source cannot be overridden by a
+non-privileged user.
 .TP
 .I <speed>
 Set the baud rate to <speed> (a decimal number).  On systems such as
 4.4BSD and NetBSD, any speed can be specified.  Other systems
 (e.g. SunOS) allow only a limited set of speeds.
 .TP
-.B active-filter \fIfilter-expression
-Specifies a packet filter to be applied to data packets to determine
-which packets are to be regarded as link activity, and therefore reset
-the idle timer, or cause the link to be brought up in demand-dialling
-mode.  This option is useful in conjunction with the
-\fBidle\fR option if there are packets being sent or received
-regularly over the link (for example, routing information packets)
-which would otherwise prevent the link from ever appearing to be idle.
-The \fIfilter-expression\fR syntax is as described for tcpdump(1),
-except that qualifiers which are inappropriate for a PPP link, such as
-\fBether\fR and \fBarp\fR, are not permitted.  Generally the filter
-expression should be enclosed in single-quotes to prevent whitespace
-in the expression from being interpreted by the shell. This option
-is currently only available under NetBSD, and then only
-if both the kernel and pppd were compiled with PPP_FILTER defined.
-.TP
 .B asyncmap \fI<map>
 Set the async character map to <map>.  This map describes which
 control characters cannot be successfully received over the serial
@@ -76,7 +60,10 @@ characters, use the \fIescape\fR option.
 .TP
 .B auth
 Require the peer to authenticate itself before allowing network
-packets to be sent or received.
+packets to be sent or received.  This option is the default if the
+system has a default route.  If neither this option nor the
+\fInoauth\fR option is specified, pppd will only allow the peer to use
+IP addresses to which the system does not already have a route.
 .TP
 .B call \fIname
 Read options from the file /etc/ppp/peers/\fIname\fR.  This file may
@@ -88,14 +75,34 @@ is described below.
 .B connect \fIscript
 Use the executable or shell command specified by \fIscript\fR to set
 up the serial line.  This script would typically use the chat(8)
-program to dial the modem and start the remote ppp session.  This
-option is privileged if the \fInoauth\fR option is used.
+program to dial the modem and start the remote ppp session.  A value
+for this option from a privileged source cannot be overridden by a
+non-privileged user.
 .TP
 .B crtscts
-Use hardware flow control (i.e. RTS/CTS) to control the flow of data
-on the serial port.  If neither the \fIcrtscts\fR nor the
-\fInocrtscts\fR option is given, the hardware flow control setting
-for the serial port is left unchanged.
+Use hardware flow control (i.e. RTS/CTS) to control the flow of
+data on the serial port.  If neither the \fIcrtscts\fR, the
+\fInocrtscts\fR, the \fIcdtrcts\fR nor the \fInocdtrcts\fR option
+is given, the hardware flow control setting for the serial port is
+left unchanged.
+Some serial ports (such as Macintosh serial ports) lack a true
+RTS output. Such serial ports use this mode to implement
+unidirectional flow control. The serial port will
+suspend transmission when requested by the modem (via CTS)
+but will be unable to request the modem stop sending to the
+computer. This mode retains the ability to use DTR as
+a modem control line.
+.TP
+.B cdtrcts
+Use a non-standard hardware flow control (i.e. DTR/CTS) to control
+the flow of data on the serial port.  If neither the \fIcrtscts\fR,
+the \fInocrtscts\fR, the \fIcdtrcts\fR nor the \fInocdtrcts\fR
+option is given, the hardware flow control setting for the serial
+port is left unchanged.
+Some serial ports (such as Macintosh serial ports) lack a true
+RTS output. Such serial ports use this mode to implement true
+bi-directional flow control. The sacrifice is that this flow
+control mode does not permit using DTR as a modem control line.
 .TP
 .B defaultroute
 Add a default route to the system routing tables, using the peer as
@@ -108,8 +115,8 @@ Run the executable or shell command specified by \fIscript\fR after
 pppd has terminated the link.  This script could, for example, issue
 commands to the modem to cause it to hang up if hardware modem control
 signals were not available.  The disconnect script is not run if the
-modem has already hung up.  This option is privileged if the
-\fInoauth\fR option is used.
+modem has already hung up.  A value for this option from a privileged
+source cannot be overridden by a non-privileged user.
 .TP
 .B escape \fIxx,yy,...
 Specifies that certain characters should be escaped on transmission
@@ -163,6 +170,22 @@ will not accept a different value from the peer in the IPCP
 negotiation, unless the \fIipcp-accept-local\fR and/or
 \fIipcp-accept-remote\fR options are given, respectively.
 .TP
+.B active-filter \fIfilter-expression
+Specifies a packet filter to be applied to data packets to determine
+which packets are to be regarded as link activity, and therefore reset
+the idle timer, or cause the link to be brought up in demand-dialling
+mode.  This option is useful in conjunction with the
+\fBidle\fR option if there are packets being sent or received
+regularly over the link (for example, routing information packets)
+which would otherwise prevent the link from ever appearing to be idle.
+The \fIfilter-expression\fR syntax is as described for tcpdump(1),
+except that qualifiers which are inappropriate for a PPP link, such as
+\fBether\fR and \fBarp\fR, are not permitted.  Generally the filter
+expression should be enclosed in single-quotes to prevent whitespace
+in the expression from being interpreted by the shell. This option
+is currently only available under NetBSD, and then only
+if both the kernel and pppd were compiled with PPP_FILTER defined.
+.TP
 .B bsdcomp \fInr,nt
 Request that the peer compress packets that it sends, using the
 BSD-Compress scheme, with a maximum code size of \fInr\fR bits, and
@@ -242,6 +265,10 @@ specify \fIdomain Quotron.COM\fR.  Pppd would then use the name
 and as the default name to send to the peer when authenticating itself
 to the peer.  This option is privileged.
 .TP
+.B hide-password
+When logging the contents of PAP packets, this option causes pppd to
+exclude the password string from the log.
+.TP
 .B holdoff \fIn
 Specifies how many seconds to wait before re-initiating the link after
 it terminates.  This option only has any effect if the \fIpersist\fR
@@ -449,7 +476,9 @@ specified is ORed with the default netmask.  The default netmask is
 chosen based on the negotiated remote IP address; it is the
 appropriate network mask for the class of the remote IP address, ORed
 with the netmasks for any non point-to-point network interfaces in the
-system which are on the same network.
+system which are on the same network.  (Note: on some platforms, pppd
+will always use 255.255.255.255 for the netmask, if that is the only
+appropriate value for a point-to-point interface.)
 .TP
 .B noaccomp
 Disable Address/Control compression in both directions (send and
@@ -457,7 +486,7 @@ receive).
 .TP
 .B noauth
 Do not require the peer to authenticate itself.  This option is
-privileged if the \fIauth\fR option is specified in /etc/ppp/options.
+privileged.
 .TP
 .B nobsdcomp
 Disables BSD-Compress compression; \fBpppd\fR will not request or
@@ -469,10 +498,14 @@ should only be required if the peer is buggy and gets confused by
 requests from pppd for CCP negotiation.
 .TP
 .B nocrtscts
-Disable hardware flow control (i.e. RTS/CTS) on the serial port.  If
-neither the \fIcrtscts\fR nor the \fInocrtscts\fR option is given,
-the hardware flow control setting for the serial port is left
-unchanged.
+Disable hardware flow control (i.e. RTS/CTS) on the serial port.
+If neither the \fIcrtscts\fR nor the \fInocrtscts\fR nor the
+\fIcdtrcts\fR nor the \fInodtrcts\fR option is given, the hardware
+flow control setting for the serial port is left unchanged.
+.TP
+.B nodtrcts
+This option is a synonym for \fInocrtscts\fR. Either of these options will
+disable both forms of hardware flow control.
 .TP
 .B nodefaultroute
 Disable the \fIdefaultroute\fR option.  The system administrator who
@@ -527,6 +560,19 @@ Disable the \fIproxyarp\fR option.  The system administrator who
 wishes to prevent users from creating proxy ARP entries with pppd can
 do so by placing this option in the /etc/ppp/options file.
 .TP
+.B notty
+Normally, pppd requires a terminal device.  With this option, pppd
+will allocate itself a pseudo-tty master/slave pair and use the slave
+as its terminal device.  Pppd will create a child process to act as a
+`character shunt' to transfer characters between the pseudo-tty master
+and its standard input and output.  Thus pppd will transmit characters
+on its standard output and receive characters on its standard input
+even if they are not terminal devices.  This option increases the
+latency and CPU overhead of transferring data over the ppp interface
+as all of the characters sent and received must flow through the
+character shunt process.  An explicit device name may not be given if
+this option is used.
+.TP
 .B novj
 Disable Van Jacobson style TCP/IP header compression in both the
 transmit and the receive direction.
@@ -582,12 +628,43 @@ compression, and agree to compress transmitted frames with Predictor-1
 if requested.  This option has no effect unless the kernel driver
 supports Predictor-1 compression.
 .TP
+.B privgroup \fIgroup-name
+Allows members of group \fIgroup-name\fR to use privileged options.
+This is a privileged option.  Use of this option requires care as
+there is no guarantee that members of \fIgroup-name\fR cannot use pppd
+to become root themselves.  Consider it equivalent to putting the
+members of \fIgroup-name\fR in the kmem or disk group.
+.TP
 .B proxyarp
 Add an entry to this system's ARP [Address Resolution Protocol] table
 with the IP address of the peer and the Ethernet address of this
 system.  This will have the effect of making the peer appear to other
 systems to be on the local ethernet.
 .TP
+.B pty \fIscript
+Specifies that the command \fIscript\fR is to be used to communicate
+rather than a specific terminal device.  Pppd will allocate itself a
+pseudo-tty master/slave pair and use the slave as its terminal
+device.  The \fIscript\fR will be run in a child process with the
+pseudo-tty master as its standard input and output.  An explicit
+device name may not be given if this option is used.
+.TP
+.B receive-all
+With this option, pppd will accept all control characters from the
+peer, including those marked in the receive asyncmap.  Without this
+option, pppd will discard those characters as specified in RFC1662.
+This option should only be needed if the peer is buggy.
+.TP
+.B record \fIfilename
+Specifies that pppd should record all characters sent and received to
+a file named \fIfilename\fR.  This file is opened in append mode,
+using the user's user-ID and permissions.  This option is implemented
+using a pseudo-tty and a process to transfer characters between the
+pseudo-tty and the real serial device, so it will increase the latency
+and CPU overhead of transferring data over the ppp interface.  The
+characters are stored in a tagged format with timestamps, which can be
+displayed in readable form using the pppdump(8) program.
+.TP
 .B remotename \fIname
 Set the assumed name of the remote system for authentication purposes
 to \fIname\fR.
@@ -613,10 +690,17 @@ With this option, pppd will not transmit LCP packets to initiate a
 connection until a valid LCP packet is received from the peer (as for
 the `passive' option with ancient versions of pppd).
 .TP
+.B sync
+Use synchronous HDLC serial encoding instead of asynchronous.
+The device used by pppd with this option must support synchronous
+serial communications. Currently supports Microgate SyncLink adapters
+under Linux.
+.TP
 .B usehostname
 Enforce the use of the hostname (with domain name appended, if given)
 as the name of the local system for authentication purposes (overrides
-the \fIname\fR option).
+the \fIname\fR option).  This option is not normally needed since the
+\fIname\fR option is privileged.
 .TP
 .B user \fIname
 Sets the name used for authenticating the local system to the peer to
@@ -630,8 +714,8 @@ must be between 2 and 16 (inclusive).
 .B welcome \fIscript
 Run the executable or shell command specified by \fIscript\fR before
 initiating PPP negotiation, after the connect script (if any) has
-completed.  This option is privileged if the \fInoauth\fR option is
-used.
+completed.  A value for this option from a privileged source cannot be
+overridden by a non-privileged user.
 .TP
 .B xonxoff
 Use software flow control (i.e. XON/XOFF) to control the flow of data on
@@ -648,7 +732,7 @@ the initial /dev/ is removed from the terminal name, and any remaining
 .PP
 An options file is parsed into a series of words, delimited by
 whitespace.  Whitespace can be included in a word by enclosing the
-word in quotes (").  A backslash (\\) quotes the following character.
+word in double-quotes (").  A backslash (\\) quotes the following character.
 A hash (#) starts a comment, which continues until the end of the
 line.  There is no restriction on using the \fIfile\fR or \fIcall\fR
 options within an options file.
@@ -657,22 +741,24 @@ options within an options file.
 provides system administrators with sufficient access control that PPP
 access to a server machine can be provided to legitimate users without
 fear of compromising the security of the server or the network it's
-on.  In part this is provided by the /etc/ppp/options file, where the
-administrator can place options to restrict the ways in which pppd can
-be used, and in part by the PAP and CHAP secrets files, where the
-administrator can restrict the set of IP addresses which individual
-users may use.
+on.  This control is provided through restrictions on which IP
+addresses the peer may use, based on its authenticated identity (if
+any), and through restrictions on which options a non-privileged user
+may use.  Several of pppd's options are privileged, in particular
+those which permit potentially insecure configurations; these options
+are only accepted in files which are under the control of the system
+administrator, or if pppd is being run by root.
 .PP
-The normal way that pppd should be set up is to have the \fIauth\fR
-option in the /etc/ppp/options file.  (This may become the default in
-later releases.)  If users wish to use pppd to dial out to a peer
-which will refuse to authenticate itself (such as an internet service
-provider), the system administrator should create an options file
-under /etc/ppp/peers containing the \fInoauth\fR option, the name of
-the serial port to use, and the \fIconnect\fR option (if required),
-plus any other appropriate options.  In this way, pppd can be set up
-to allow non-privileged users to make unauthenticated connections only
-to trusted peers.
+The default behaviour of pppd is to allow an unauthenticated peer to
+use a given IP address only if the system does not already have a
+route to that IP address.  For example, a system with a
+permanent connection to the wider internet will normally have a
+default route, and thus all peers will have to authenticate themselves
+in order to set up a connection.  On such a system, the \fIauth\fR
+option is the default.  On the other hand, a system where the
+PPP link is the only connection to the internet will not normally have
+a default route, so the peer will be able to use almost any IP address
+without authenticating itself.
 .PP
 As indicated above, some security-sensitive options are privileged,
 which means that they may not be used by an ordinary non-privileged
@@ -682,6 +768,17 @@ option.  Privileged options may be used in /etc/ppp/options file or in
 an options file read using the \fIcall\fR option.  If pppd is being
 run by the root user, privileged options can be used without
 restriction.
+.PP
+When opening the device, pppd uses either the invoking user's user ID
+or the root UID (that is, 0), depending on whether the device name was
+specified by the user or the system administrator.  If the device name
+comes from a privileged source, that is, /etc/ppp/options or an
+options file read using the \fIcall\fR option, pppd uses full root
+privileges when opening the device.  Thus, by creating an appropriate
+file under /etc/ppp/peers, the system administrator can allow users to
+establish a ppp connection via a device which they would not normally
+have permission to access.  Otherwise pppd uses the invoking user's
+real UID when opening the device.
 .SH AUTHENTICATION
 Authentication is the process whereby one peer convinces the other of
 its identity.  This involves the first peer sending its name to the
@@ -950,10 +1047,46 @@ causes other debugging messages to be logged.
 .LP
 Debugging can also be enabled or disabled by sending a SIGUSR1 signal
 to the pppd process.  This signal acts as a toggle.
-.SH FILES
-.TP
-.B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
-Process-ID for pppd process on ppp interface unit \fIn\fR.
+.SH SCRIPTS
+Pppd invokes scripts at various stages in its processing which can be
+used to perform site-specific ancillary processing.  These scripts are
+usually shell scripts, but could be executable code files instead.
+Pppd does not wait for the scripts to finish.  The scripts are
+executed as root (with the real and effective user-id set to 0), so
+that they can do things such as update routing tables or run
+privileged daemons.  Be careful that the contents of these scripts do
+not compromise your system's security.  Pppd runs the scripts with
+standard input, output and error redirected to /dev/null, and with an
+environment that is empty except for some environment variables that
+give information about the link.  The environment variables that pppd
+sets are:
+.TP
+.B DEVICE
+The name of the serial tty device being used.
+.TP
+.B IFNAME
+The name of the network interface being used.
+.TP
+.B IPLOCAL
+The IP address for the local end of the link.  This is only set when
+IPCP has come up.
+.TP
+.B IPREMOTE
+The IP address for the remote end of the link.  This is only set when
+IPCP has come up.
+.TP
+.B PEERNAME
+The authenticated name of the peer.  This is only set if the peer
+authenticates itself.
+.TP
+.B SPEED
+The baud rate of the tty device.
+.TP
+.B ORIG_UID
+The real user-id of the user who invoked pppd.
+.P
+Pppd invokes the following scripts, if they exist.  It is not an error
+if they don't exist.
 .TP
 .B /etc/ppp/auth-up
 A program or script which is executed after the remote system
@@ -961,11 +1094,8 @@ successfully authenticates itself.  It is executed with the parameters
 .IP
 \fIinterface-name peer-name user-name tty-device speed\fR
 .IP
-and with its standard input, output and error redirected to
-/dev/null.  This program or script is executed with the real and
-effective user-IDs set to root, and with an empty environment.  (Note
-that this script is not executed if the peer doesn't authenticate
-itself, for example when the \fInoauth\fR option is used.)
+Note that this script is not executed if the peer doesn't authenticate
+itself, for example when the \fInoauth\fR option is used.
 .TP
 .B /etc/ppp/auth-down
 A program or script which is executed when the link goes down, if
@@ -979,25 +1109,13 @@ executed with the parameters
 .IP
 \fIinterface-name tty-device speed local-IP-address
 remote-IP-address ipparam\fR
-.IP
-and with its standard input,
-output and error streams redirected to /dev/null.
-.IP
-This program or script is executed with the real and effective
-user-IDs set to root.  This is so that it can be used to manipulate
-routes, run privileged daemons (e.g. \fIsendmail\fR), etc.  Be
-careful that the contents of the /etc/ppp/ip-up and /etc/ppp/ip-down
-scripts do not compromise your system's security.
-.IP
-This program or script is executed with an empty environment, so you
-must either specify a PATH or use full pathnames.
 .TP
 .B /etc/ppp/ip-down
 A program or script which is executed when the link is no longer
 available for sending and receiving IP packets.  This script can be
 used for undoing the effects of the /etc/ppp/ip-up script.  It is
 invoked in the same manner and with the same parameters as the ip-up
-script, and the same security considerations apply.
+script.
 .TP
 .B /etc/ppp/ipx-up
 A program or script which is executed when the link is available for
@@ -1008,10 +1126,6 @@ executed with the parameters
 remote-IPX-node-address local-IPX-routing-protocol remote-IPX-routing-protocol
 local-IPX-router-name remote-IPX-router-name ipparam pppd-pid\fR 
 .IP
-and with its standard input,
-output and error streams redirected to /dev/null.
-.br
-.IP
 The local-IPX-routing-protocol and remote-IPX-routing-protocol field
 may be one of the following:
 .IP
@@ -1022,21 +1136,17 @@ RIP       to indicate that RIP/SAP should be used
 NLSP      to indicate that Novell NLSP should be used
 .br
 RIP NLSP  to indicate that both RIP/SAP and NLSP should be used
-.br
-.IP
-This program or script is executed with the real and effective
-user-IDs set to root, and with an empty environment.  This is so
-that it can be used to manipulate routes, run privileged daemons (e.g.
-\fIripd\fR), etc.  Be careful that the contents of the /etc/ppp/ipx-up
-and /etc/ppp/ipx-down scripts do not compromise your system's
-security.
 .TP
 .B /etc/ppp/ipx-down
 A program or script which is executed when the link is no longer
 available for sending and receiving IPX packets.  This script can be
 used for undoing the effects of the /etc/ppp/ipx-up script.  It is
 invoked in the same manner and with the same parameters as the ipx-up
-script, and the same security considerations apply.
+script.
+.SH FILES
+.TP
+.B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)
+Process-ID for pppd process on ppp interface unit \fIn\fR.
 .TP
 .B /etc/ppp/pap-secrets
 Usernames, passwords and IP addresses for PAP authentication.  This