]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/pppd.8
explain about behaviour when opening the device
[ppp.git] / pppd / pppd.8
index e7ea9c4a5e8eb2718aba3fd54af1dfe4def01eff..a4cd4c596aae311e840e5e57624465240fc30fba 100644 (file)
@@ -1,5 +1,5 @@
 .\" manual page [] for pppd 2.3
-.\" $Id: pppd.8,v 1.28 1998/09/04 18:49:15 christos Exp $
+.\" $Id: pppd.8,v 1.33 1999/03/03 00:52:08 paulus Exp $
 .\" SH section heading
 .\" SS subsection heading
 .\" LP paragraph
@@ -35,32 +35,14 @@ 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.
 .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 +58,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
@@ -98,7 +83,7 @@ data on the serial port.  If neither the \fIcrtscts\fR, the
 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 impliment
+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
@@ -112,8 +97,8 @@ 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 impliment true
-bi-directional flow control. The sacrafice is that this flow
+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
@@ -182,6 +167,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
@@ -261,6 +262,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
@@ -468,7 +473,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
@@ -476,7 +483,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
@@ -639,7 +646,8 @@ the `passive' option with ancient versions of pppd).
 .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
@@ -680,22 +688,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
@@ -705,6 +715,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
@@ -1008,7 +1029,7 @@ authenticates itself.
 .B SPEED
 The baud rate of the tty device.
 .TP
-.B UID
+.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