PPPD(8)
okay so bestie, welcome to the PPPD(8) manual page โ the one from the System Manager's Manual โ all about pppd, the Point-to-Point Protocol Daemon. She's iconic, she's vintage, she runs the link. ๐
๐ NAME ๐
pppd โ Point-to-Point Protocol Daemon. That's the name, that's the vibe, no notes. ๐ฆ
๐ฆ SYNOPSIS ๐ฆ
pppd [ options ]
๐ DESCRIPTION ๐
PPP is the protocol used for establishing internet links over dial-up modems, DSL connections, and many other types of point-to-point links. Like, it's the connect-y protocol. The pppd daemon works together with the kernel PPP driver to establish and maintain a PPP link with another system (called the peer) and to negotiate Internet Protocol (IP) addresses for each end of the link. pppd can also authenticate the peer and/or supply authentication information to the peer. PPP can be used with other network protocols besides IP, but such use is becoming increasingly rare. iykyk ๐ญ
โจ FREQUENTLY USED OPTIONS โจ
Okay bestie, these are the ones you'll see all the time. Hydrate before reading. ๐
ttynameโ Use the serial port called ttyname to communicate with the peer. If ttyname does not begin with a slash (/), the string"/dev/"is prepended to ttyname to form the name of the device to open. If no device name is given, or if the name of the terminal connected to the standard input is given,pppdwill 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. ๐ซถspeedโ An option that is a decimal number is taken as the desired baud rate for the serial device. On systems such as Linux, 4.4BSD and NetBSD, any speed can be specified. Other systems (e.g. SunOS) only support the commonly-used baud rates. Numbers go brrr. โญasyncmap mapโ This option sets the Async-Control-Character-Map (ACCM) for this end of the link. The ACCM is a set of 32 bits, one for each of the ASCII control characters with values from 0 to 31, where a 1 bit indicates that the corresponding control character should not be used in PPP packets sent to this system. The map is encoded as a hexadecimal number (without a leading0x) where the least significant bit (00000001) represents character 0 and the most significant bit (80000000) represents character 31.pppdwill ask the peer to send these characters as a 2-byte escape sequence. If multipleasyncmapoptions are given, the values are ORed together. If noasyncmapoption is given, the default is zero, sopppdwill ask the peer not to escape any control characters. To escape transmitted characters, use theescapeoption. Map girlie pop. ๐authโ Require the peer to authenticate itself before allowing network packets to be sent or received. For security reasons this option is the default ifpppdis executed as a non-privileged user, unless thenoauthoption is in effect (sincenoauthis a privileged option, it would need to come from a privileged options file, not the command line). Security queen. ๐ฅcall nameโ Read additional options from the file/etc/ppp/peers/name. This file may contain privileged options, such asnoauth, even ifpppdis not being run by root. The name string may not begin with/or include..as a pathname component. The format of the options file is described below. Fancy little include, but make it secure. ๐connect scriptโ Usually there is something which needs to be done to prepare the link before the PPP protocol can be started; for instance, with a dial-up modem, commands need to be sent to the modem to dial the appropriate phone number. This option specifies a command forpppdto execute (by passing it to a shell) before attempting to start PPP negotiation. Thechat (8)program is often useful here, as it provides a way to send arbitrary strings to a modem and respond to received characters. A value for this option from a privileged source cannot be overridden by a non-privileged user. ๐crtsctsโ Specifies thatpppdshould set the serial port to use hardware flow control using the RTS and CTS signals in the RS-232 interface. If neither thecrtscts, thenocrtscts, thecdtrctsnor thenocdtrctsoption 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 to stop sending to the computer. This mode retains the ability to use DTR as a modem control line. Flow control drama, but make it hardware. ๐defaultrouteโ Add a default route to the system routing tables, using the peer as the gateway, when IPCP negotiation is successfully completed. This entry is removed when the PPP connection is broken. This option is privileged. ๐ฃ๏ธdefaultroute-metricโ Define the metric of thedefaultroute. By default the default route will be added with a metric of0. This option is privileged. ๐disconnect scriptโ Execute the command specified by script, by passing it to a shell, afterpppdhas terminated the link. This command 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. A value for this option from a privileged source cannot be overridden by a non-privileged user. ๐escape xx,yy,...โ Specifies that certain characters should be escaped on transmission (regardless of whether the peer requests them to be escaped with its async control character map). The characters to be escaped are specified as a list of hex numbers separated by commas. Note that almost any character can be specified for theescapeoption, unlike theasyncmapoption which only allows control characters to be specified. The characters which may not be escaped are those with hex values0x20-0x3for0x5e. Escape room, but for bytes. ๐ชfile nameโ Read options from file name (the format is described below). The file must be readable by the user who has invokedpppd. Read the room, and also the file. ๐init scriptโ Execute the command specified by script, by passing it to a shell, to initialize the serial line. This script would typically use thechat(8)program to configure the modem to enable auto answer. A value for this option from a privileged source cannot be overridden by a non-privileged user. ๐ ๏ธlockโ Specifies thatpppdshould create a UUCP-style lock file for the serial device to ensure exclusive access to the device. By default,pppdwill not create a lock file. Lock it down, bestie. ๐mru nโ Set the MRU [Maximum Receive Unit] value to n.pppdwill ask the peer to send packets of no more than n bytes. The value of n must be between128and16384; the default is1500. A value of296works well on very slow links (40bytes for TCP/IP header +256bytes of data). Note that for the IPv6 protocol, the MRU must be at least1280. MRU said respect my limits. ๐ฆmtu nโ Set the MTU [Maximum Transmit Unit] value to n. Unless the peer requests a smaller value via MRU negotiation,pppdwill request that the kernel networking code send data packets of no more than n bytes through the PPP network interface. Note that for the IPv6 protocol, the MTU must be at least1280. Send it, but not too big. ๐คpassiveโ Enables the"passive"option in the LCP. With this option,pppdwill attempt to initiate a connection; if no reply is received from the peer,pppdwill then just wait passively for a valid LCP packet from the peer, instead of exiting, as it would without this option. Not me waiting by the phone, but literally LCP. ๐ด
๐ OPTIONS ๐
Okay, now the full options buffet. No skipping, bestie โ every detail is a snack. ๐
<local_IP_address>:<remote_IP_address>โ Set the local and/or remote interface IP addresses. Either one may be omitted. The IP addresses can be specified with a host name or in decimal dot notation (e.g.150.234.56.78). The default local address is the (first) IP address of the system (unless thenoipdefaultoption is given). The remote address will be obtained from the peer if not specified in any option. Thus, in simple cases, this option is not required. If a local and/or remote IP address is specified with this option,pppdwill not accept a different value from the peer in the IPCP negotiation, unless theipcp-accept-localand/oripcp-accept-remoteoptions are given, respectively. Address reveal, but consensual. ๐+ipv6โ Enable the IPv6CP and IPv6 protocols. IPv6 girlies rise. ๐ฆipv6 <local_interface_identifier>,<remote_interface_identifier>โ Set the local and/or remote 64-bit interface identifier. Either one may be omitted. The identifier must be specified in standard ASCII notation of IPv6 addresses (e.g.::dead:beef). If theipv6cp-use-ipaddroption is given, the local identifier is the local IPv4 address and the remote identifier is the remote IPv4 address (see above). If theipv6cp-use-remotenumberoption is given, the remote identifier is set to the value fromremotenumberoption. On systems which supports a unique persistent id, such as EUI-48 derived from the Ethernet MAC address,ipv6cp-use-persistentoption can be used to set local identifier. Otherwise both local and remote identifiers are randomized. Identifier? I hardly know her. ๐ชชactive-filter filter-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 theidleoption 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 filter-expression syntax is as described fortcpdump(1), except that qualifiers which are inappropriate for a PPP link, such asetherandarp, 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 Linux, and requires that the kernel was configured to include PPP filtering support (CONFIG_PPP_FILTER). Note that it is possible to apply different constraints to incoming and outgoing packets using theinboundandoutboundqualifiers. Filter it, but make it Linux. ๐allow-ipaddress(es) โ bestie, this one lets peers use the given IP address or subnet without authenticating themselves ๐ณ the parameter gets parsed exactly the same way as each element of the list of allowed IP addresses in the secrets files (peep the AUTHENTICATION section below, iykyk).allow-numbernumber โ lets peers connect from that given telephone number โ๏ธ and a trailing*character will match all numbers beginning with the leading part. cute little wildcard moment.bsdcompnr,nt โ requests that the peer compress packets it sends using the BSD-Compress scheme, with a max code size of nr bits, and agrees to compress packets sent to the peer with a max code size of nt bits. If nt isn't specified it defaults to whatever you gave for nr. Values in the range 9 to 15 may be used for nr and nt โ bigger values give better compression but consume more kernel memory for compression dictionaries. Alternatively, a value of 0 for nr or nt disables compression in the corresponding direction. Usenobsdcomporbsdcomp 0to disable BSD-Compress compression entirely โจcaca-file โ (EAP-TLS, or PEAP) use the file ca-file as the X.509 Certificate Authority (CA) file (in PEM format), needed for setting up an EAP-TLS connection ๐ this option is used on the client-side in conjunction with thecertandkeyoptions. Eithercaorcapathoptions are required for PEAP. EAP-TLS may also use the entry ineaptls-clientoreaptls-serverfor a CA certificate associated with a particular peer. This option is privileged.capathpath โ (EAP-TLS, or PEAP) specify a location that contains public CA certificates ๐ธ eithercaorcapathoptions are required for PEAP. This option is privileged.cdtrctsโ use a non-standard hardware flow control (i.e. DTR/CTS) to control the flow of data on the serial port ๐ฆ if neither thecrtscts, thenocrtscts, thecdtrctsnor thenocdtrctsoption 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? This flow control mode does not permit using DTR as a modem control line ๐ญ trade-offs, we hate to see it.certcertfile โ (EAP-TLS) use the file certfile as the X.509 certificate (in PEM format), needed for setting up an EAP-TLS connection ๐ this option is used on the client-side in conjunction with thecaandkeyoptions. This option is privileged.chap-intervaln โ if this option is given,pppdwill rechallenge the peer every n seconds โฐchap-max-challengen โ set the maximum number of CHAP challenge transmissions to n (default 10).chap-restartn โ set the CHAP restart interval (retransmission timeout for challenges) to n seconds (default 3).chap-timeoutn โ set timeout for CHAP authentication by peer to n seconds (default 60).chapms-strip-domainโ some Windows 9x/ME clients might be transmitting the MS domain before the username in the provided client name ๐ this option enables stripping the domain from the client name on the server side before matching it against the secret file. server-side glow-up fr fr.child-timeoutn โ when exiting, wait for up to n seconds for any child processes (such as the command specified with theptycommand) to exit before exiting. At the end of the timeout,pppdwill send aSIGTERMsignal to any remaining child processes and exit ๐ค a value of 0 means no timeout โ that is,pppdwill wait until all child processes have exited.connect-delayn โ wait for up to n milliseconds after the connect script finishes for a valid PPP packet from the peer โญ at the end of this time, or when a valid PPP packet is received from the peer,pppdwill commence negotiation by sending its first LCP packet. The default value is 1000 (1 second). This wait period only applies if theconnectorptyoption is used.crlfilename โ (EAP-TLS, or PEAP) use the file filename as the Certificate Revocation List to check for the validity of the peer's certificate ๐ this option is not mandatory for setting up a TLS connection. Also see thecrl-diroption. This option is privileged.crl-dirdirectory โ (EAP-TLS, or PEAP) use the directory directory to scan for CRL files in has format ($hash.r0) to check for the validity of the peer's certificate ๐ this option is not mandatory for setting up a TLS connection. Also see thecrloption. This option is privileged.debugโ enables connection debugging facilities ๐ if this option is given,pppdwill log the contents of all control packets sent or received in a readable form. The packets are logged throughsyslogwith facilitydaemonand leveldebug. This information can be directed to a file by setting up/etc/syslog.confappropriately (seesyslog.conf(5)). main character energy for your logs, honestly.default-asyncmapโ disable asyncmap negotiation, forcing all control characters to be escaped for both the transmit and the receive direction ๐ no escape from the escapes.default-mruโ disable MRU [Maximum Receive Unit] negotiation. With this option,pppdwill use the default MRU value of 1500 bytes for both the transmit and receive direction.defaultroute6โ add a default IPv6 route to the system routing tables, using the peer as the gateway, when IPv6CP negotiation is successfully completed ๐ this entry is removed when the PPP connection is broken. This option is privileged.
โ ๏ธ WARNING: do not enable this option by default. IPv6 routing tables are managed by kernel (as opposed to IPv4) and the IPv6 default route is configured by kernel automatically based on ICMPv6 Router Advertisement packets. This option may conflict with kernel IPv6 route setup and should be used only for broken IPv6 networks. like, only for emergencies bestie, don't make it a habit ๐ญ
defaultroute6-metricโ define the metric of thedefaultroute6. By default the default route will be added with a metric of 0 ๐ this option is privileged.deflatenr,nt โ requests that the peer compress packets it sends using the Deflate scheme, with a maximum window size of2**nrbytes, and agrees to compress packets sent to the peer with a maximum window size of2**ntbytes โจ if nt isn't specified it defaults to the value given for nr. Values in the range 9 to 15 may be used for nr and nt โ larger values give better compression but consume more kernel memory for compression dictionaries. Alternatively, a value of 0 for nr or nt disables compression in the corresponding direction. Usenodeflateordeflate 0to disable Deflate compression entirely. (Note:pppdrequests Deflate compression in preference to BSD-Compress if the peer can do either ๐ฅ deflate stays winning.)demandโ initiate the link only on demand, i.e. when data traffic is present ๐ค with this option, the remote IP address may be specified by the user on the command line or in an options file, or if not,pppdwill use an arbitrary address in the10.x.x.xrange.pppdwill initially configure the interface and enable it for IP traffic without connecting to the peer. When traffic is available,pppdwill connect to the peer and perform negotiation, authentication, etc. When this is completed,pppdwill commence passing data packets (i.e., IP packets) across the link.
The demand option implies the persist option ๐ซถ if this behaviour is not desired, use the nopersist option after the demand option. The idle and holdoff options are also useful in conjunction with the demand option.
domaind โ append the domain name d to the local host name for authentication purposes ๐ for example, ifgethostname()returns the nameporsche, but the fully qualified domain name isporsche.Quotron.COM, you could specifydomain Quotron.COM.pppdwould then use the nameporsche.Quotron.COMfor looking up secrets in the secrets file, and as the default name to send to the peer when authenticating itself to the peer. This option is privileged.dryrunโ with thedryrunoption,pppdwill print out all the option values which have been set and then exit ๐ after parsing the command line and options files and checking the option values, but before initiating the link. The option values are logged at levelinfo, and also printed to standard output unless the device on standard output is the device thatpppdwould be using to communicate with the peer. it's giving "let me check my fit before I leave the house" ๐dumpโ with thedumpoption,pppdwill print out all the option values which have been set ๐ this option is like thedryrunoption except thatpppdproceeds as normal rather than exiting. same energy, but it actually goes outside.enable-sessionโ enables session accounting via PAM orwtwp/wtmpx, as appropriate ๐ง when PAM is enabled, the PAM "account" and "session" module stacks determine behavior, and are enabled for all PPP authentication protocols. When PAM is disabled,wtmp/wtmpxentries are recorded regardless of whether the peer name identifies a valid user on the local system, making peers visible in thelast(1)log ๐ this feature is automatically enabled when thepppdloginoption is used. Session accounting is disabled by default.endpoint <epdisc>โ sets the endpoint discriminator that our machine sends to the peer during multilink negotiation. โจ
The default is lowkey a whole saga: it uses the MAC address of the first ethernet interface on the system if there is one, otherwise the IPv4 address that corresponds to the hostname (if there is one) โ but only if that address is not in the multicast or locally-assigned IP address ranges โ otherwise it falls back to the localhost address.
<epdisc> can be the string null, or it can be of the form type:value, where type is a decimal number or one of the strings local, IP, MAC, magic, or phone. The value is an IP address in dotted-decimal notation for the IP type, or a string of bytes in hexadecimal, separated by periods or colons for the other types. For the MAC type, the value may also be the name of an ethernet or similar network interface. ๐ฆ
This option is currently only available under Linux, bestie. ๐
eap-interval nโ if this option is given andpppdauthenticates the peer with EAP (i.e. it's the server), thenpppdwill restart EAP authentication every n seconds. For EAP SRP-SHA1, see also thesrp-intervaloption โ that's the one that enables lightweight rechallenge. ๐eap-max-rreq nโ sets the max number of EAP Requests thatpppdwill respond to (as a client) without hearing EAP Success or Failure. Default is20. โญeap-max-sreq nโ sets the max number of EAP Requestspppdwill issue (as a server) while attempting authentication. Default is10. ๐ฅeap-restart nโ sets the retransmit timeout for EAP Requests when acting as a server (authenticator). Default is3seconds. ๐eap-timeout nโ sets the maximum time to wait for the peer to send an EAP Request when acting as a client (authenticatee). Default is20seconds. ๐ธhide-passwordโ when logging the contents of PAP packets, this makespppdexclude the password string from the log. This is the default, and honestly it should be, no cap. ๐holdoff nโ specifies how many seconds to wait before re-initiating the link after it terminates. This option only has any effect if thepersistordemandoption is used. The holdoff period is not applied if the link was terminated because it was idle, because connect time expired, because of modem hangup, or because of a user request. โณidle nโ specifies thatpppdshould disconnect if the link is idle for n seconds. The link counts as idle when no data packets (i.e. IP packets) are being sent or received.
Note: it is not advisable to use this option with thepersistoption without thedemandoption. ๐ญ
If the active-filter option is given, data packets which get rejected by the specified activity filter also count as the link being idle. ๐
ipcp-accept-localโ with this option,pppdwill accept the peer's idea of our local IP address, even if the local IP address was specified in an option. ๐ซถipcp-accept-remoteโ with this option,pppdwill accept the peer's idea of its (remote) IP address, even if the remote IP address was specified in an option. ๐ซถipcp-max-configure nโ sets the max number of IPCP configure-request transmissions to n (default10). โจipcp-max-failure nโ sets the max number of IPCP configure-NAKs returned before it starts sending configure-Rejects instead to n (default100). ๐ฅipcp-max-terminate nโ sets the max number of IPCP terminate-request transmissions to n (default3). ๐ipcp-no-addressโ disables negotiation of addresses via the IP-Address IPCP option. ๐ซipcp-no-addressesโ disables negotiation of addresses via the old-style deprecated IP-Addresses IPCP option.pppdby default tries to use the new-style IP-Address IPCP option. If the new-style one isn't supported by the peer, or is disabled by theipcp-no-addressoption, thenpppdfalls back to the old-style deprecated IP-Addresses IPCP option. When both new-style and old-style are disabled by bothipcp-no-addressandipcp-no-addresses, then negotiation of IP addresses is completely disabled. ๐ipcp-restart nโ sets the IPCP restart interval (retransmission timeout) to n seconds (default3). ๐ธipparam stringโ provides an extra parameter to most of the notification scripts โ most notably theip-up,ip-pre-up,ip-down,ipv6-up,ipv6-down,auth-upandauth-downscripts. If this option is given, the string supplied is given as the 6th parameter to those scripts. ๐ฆipv6cp-accept-localโ with this option,pppdwill accept the peer's idea of our local IPv6 interface identifier, even if the local IPv6 interface identifier was specified in an option. ๐ซถipv6cp-accept-remoteโ with this option,pppdwill accept the peer's idea of its (remote) IPv6 interface identifier, even if the remote IPv6 interface identifier was specified in an option. ๐ซถipv6cp-noremoteโ letspppdoperate without having an IPv6 link local address for the peer. Only available under Linux, bb. ๐ง
Normally, pppd will request the peer's IPv6 interface identifier (that's the thing used for composing the IPv6 link local address), and if the peer doesn't supply it, pppd generates one for the peer. With this option, if the peer does not supply its IPv6 interface identifier, pppd will not ask the peer for it, and will not set the destination IPv6 link local address of the ppp interface. In that situation, the ppp interface can still be used for routing by creating device routes, but the peer itself cannot be addressed directly for IPv6 traffic until the peer starts announcing ICMPv6 Router Advertisement or ICMPv6 Neighbor Advertisement packets.
Note that an IPv6 router must announce ICMPv6 Router Advertisement packets. ๐
ipv6cp-nosendipโ don't send our local IPv6 interface identifier to the peer during IPv6 interface identifier negotiation. ๐ โโ๏ธipv6cp-max-configure nโ sets the max number of IPv6CP configure-request transmissions to n (default10). โจipv6cp-max-failure nโ sets the max number of IPv6CP configure-NAKs returned before it starts sending configure-Rejects instead to n (default10). ๐ฅipv6cp-max-terminate nโ sets the max number of IPv6CP terminate-request transmissions to n (default3). ๐ipv6cp-restart nโ sets the IPv6CP restart interval (retransmission timeout) to n seconds (default3). ๐ธkdebug nโ enables debugging code in the kernel-level PPP driver. The argument values depend on the specific kernel driver, but in general a value of1will enable general kernel debug messages. (Note that these messages are usually only useful for debugging the kernel driver itself.) ๐
For the Linux 2.2.x kernel driver, the value is a sum of bits:
1โ enable general debug messages2โ request that the contents of received packets be printed4โ request that the contents of transmitted packets be printed
On most systems, messages printed by the kernel are logged by syslog(1) to a file as directed in the /etc/syslog.conf configuration file. ๐
key keyfileโ (EAP-TLS) use the file keyfile as the private key file (in PEM format), needed for setting up an EAP-TLS connection. This option is used on the client-side in conjunction with thecaandcertoptions. This option is privileged. ๐ktuneโ enablespppdto alter kernel settings as appropriate. Under Linux,pppdwill enable IP forwarding (i.e. set/proc/sys/net/ipv4/ip_forwardto1) if theproxyarpoption is used, and will enable the dynamic IP address option (i.e. set/proc/sys/net/ipv4/ip_dynaddrto1) in demand mode if the local address changes. ๐ ๏ธlcp-echo-adaptiveโ if this option is used with thelcp-echo-failureoption, thenpppdwill send LCP echo-request frames only if no traffic was received from the peer since the last echo-request was sent. ๐ฆlcp-echo-failure nโ if this option is given,pppdwill presume the peer is dead if n LCP echo-requests are sent without receiving a valid LCP echo-reply. If that happens,pppdwill terminate the connection. ๐
Using this option requires a non-zero value for the lcp-echo-interval parameter. This option can be used to let pppd terminate after the physical connection has been broken (e.g. the modem has hung up) in situations where no hardware modem control lines are available. ๐ญ
lcp-echo-interval nโ if this option is given,pppdwill send an LCP echo-request frame to the peer every n seconds. Normally the peer should respond to the echo-request by sending an echo-reply. This option can be used with thelcp-echo-failureoption to detect that the peer is no longer connected. ๐lcp-max-configure nโ sets the max number of LCP configure-request transmissions to n (default10). โจlcp-max-failure nโ sets the max number of LCP configure-NAKs returned before it starts sending configure-Rejects instead to n (default10). ๐ฅlcp-max-terminate nโ sets the max number of LCP terminate-request transmissions to n (default3). ๐lcp-restart nโ sets the LCP restart interval (retransmission timeout) to n seconds (default3). ๐ธlcp-rtt-file filenameโ sets the file where the round-trip time (RTT) of LCP echo-request frames will be logged. ๐linkname nameโ sets the logical name of the link to name.pppdwill create a file namedppp-name.pidin/var/run(or/etc/pppon some systems) containing its process ID. This can be useful in determining which instance ofpppdis responsible for the link to a given peer system. This is a privileged option. ๐localโ don't use the modem control lines. With this option,pppdwill ignore the state of the CD (Carrier Detect) signal from the modem and will not change the state of the DTR (Data Terminal Ready) signal. This is the opposite of themodemoption. ๐logfd nโ sends log messages to file descriptor n. Okay so heads up: pppd will only ever send logs to one file or file descriptor (plus syslog, always syslog), so this one andlogfileare mutually exclusive โ pick a lane bestie ๐ . Default is stdout (that's file descriptor1), unless the serial port is already open on stdout.logfile filenameโ appends log messages to the file filename (again, syslog still gets them too, she's generous like that โจ). The file gets opened with the privileges of whoever invoked pppd, in append mode.loginโ uses the system password database to authenticate the peer via PAP, and records the user in the systemwtmpfile. Lowkey important caveat: the peer needs an entry in/etc/ppp/pap-secretsas well as in the system password database to actually be allowed in. Also peep theenable-sessionoption ๐.master_detachโ so if multilink is enabled and this pppd process is the multilink bundle master, and the link controlled by this process terminates, this pppd process keeps running to maintain the bundle. And if you gavemaster_detach, pppd will detach from its controlling terminal in that situation โ even ifnodetachwas given. Yes, it overrides. Iconic behavior honestly ๐.maxconnect nโ terminates the connection once it's been available for network traffic for n seconds (that's n seconds after the first network control protocol comes up, to be precise โฑ๏ธ).maxfail nโ terminates after n consecutive failed connection attempts. A value of0means no limit. Default is10โ so she's a patient queen but not infinitely patient ๐.max-tls-version stringโ (EAP-TLS, or PEAP) configures the max allowed TLS version used while negotiating with a peer. Default is1.2. Allowed values:1.0.,1.1,1.2,1.3. This option is privileged ๐.modemโ use the modem control lines. This one is the default. With it, pppd waits for the CD (Carrier Detect) signal from the modem to be asserted when opening the serial device โ unless a connect script is specified โ and it'll drop the DTR (Data Terminal Ready) signal briefly when the connection terminates and before running the connect script. On Ultrix, this option implies hardware flow control, same ascrtscts. This is the opposite of thelocaloption ๐ธ.mpโ enables PPP multilink; it's just an alias for themultilinkoption, same vibe different name. Currently only available under Linux ๐ง.mppe-statefulโ lets MPPE use stateful mode. Stateless mode is still attempted first though, she's gotta try the good one first ๐ . Default is to disallow stateful mode.mpshortseqโ enables short (12-bit) sequence numbers in multilink headers instead of 24-bit sequence numbers. Linux-only, and it only does anything if multilink is enabled (see themultilinkoption) โจ.mrru nโ sets the Maximum Reconstructed Receive Unit to n. MRRU is the max size for a received packet on a multilink bundle, and it's analogous to the MRU for the individual links. Linux-only, and again only matters if multilink is enabled (seemultilink) ๐ซถ.ms-dns <addr>โ if pppd is acting as a server for Microsoft Windows clients, this lets pppd hand out one or two DNS (Domain Name Server) addresses to the clients. First instance of the option = primary DNS address; second instance (if you give one) = secondary DNS address. Fun fact: this option existed in some older versions of pppd under the namedns-addr๐ฆ.ms-wins <addr>โ if pppd is serving Microsoft Windows or "Samba" clients, this lets pppd supply one or two WINS (Windows Internet Name Services) server addresses to the clients. First instance = primary WINS address; second instance (if given) = secondary WINS address ๐.multilinkโ enables PPP multilink protocol. If the peer also supports multilink, this link can become part of a bundle between the local system and the peer. If there's already a bundle to the peer, pppd joins this link to that bundle; otherwise pppd creates a new bundle. Check the MULTILINK section below for the deets. Currently Linux-only ๐.name nameโ sets the name of the local system for authentication purposes to name. Privileged option ๐. With it, pppd uses lines in the secrets files that have name as the second field when hunting for a secret to authenticate the peer. Also, unless you override it with theuseroption, name is what gets sent to the peer when authenticating the local system to the peer. (Note: pppd does not append the domain name to name โ no auto-suffix, no surprises โจ.)netmask maskโ sets the IPv4 network mask on the PPP interface to mask, which you can write in dotted-quad notation or as a single hexadecimal number preceded by0x. Normally you don't need this because the PPP interface is a point-to-point connection, but in some specialized circumstances it comes in clutch ๐ .noaccompโ disables Address/Control compression in both directions (send and receive) ๐.need-peer-eapโ (EAP-TLS) requires the peer to verify our authentication credentials. Mutual trust, bestie ๐ค.noauthโ do not require the peer to authenticate itself. This option is privileged ๐.nobsdcompโ disables BSD-Compress compression; pppd won't request or agree to compress packets using the BSD-Compress scheme ๐ซ.noccpโ disables CCP (Compression Control Protocol) negotiation. Only really needed if the peer is buggy and gets confused by pppd's requests for CCP negotiation ๐.nocrtsctsโ disables hardware flow control (i.e. RTS/CTS) on the serial port. And listen: if none ofcrtscts,nocrtscts,cdtrcts, ornocdtrctsis given, the hardware flow control setting for the serial port is left unchanged โ untouched, unbothered, living her life ๐ธ.nocdtrctsโ synonym fornocrtscts. Either one disables both forms of hardware flow control ๐nodefaultrouteโ disables thedefaultrouteoption.nodefaultroute6โ disables thedefaultroute6option.nodeflateโ disables Deflate compression; pppd won't request or agree to compress packets using the Deflate scheme ๐ซ.nodetachโ don't detach from the controlling terminal. Without this option, if a serial device other than the terminal on standard input is specified, pppd forks and becomes a background process ๐ง.noendpointโ stops pppd from sending an endpoint discriminator to the peer or accepting one from the peer (see the MULTILINK section below). Only needed if the peer is buggy ๐.noipโ disables IPCP negotiation and IP communication. Again: only required if the peer is buggy and gets confused by pppd's requests for IPCP negotiation ๐ญ.noipv6โ disables IPv6CP negotiation and IPv6 communication. Same deal โ only required if the peer is buggy and gets confused by pppd's requests for IPv6CP negotiation ๐.noipdefaultโ disables the default behaviour when no local IP address is specified, which is to determine (if possible) the local IP address from the hostname. With this option, the peer has to supply the local IP address during IPCP negotiation (unless it's specified explicitly on the command line or in an options file) โจ.noktuneโ opposite of thektuneoption; disables pppd from changing system settings ๐.nolockโ opposite of thelockoption; says pppd should not create a UUCP-style lock file for the serial device. Privileged option ๐.nologโ do not send log messages to a file or file descriptor. This option cancels thelogfdandlogfileoptions. Silence, but make it intentional ๐คซ.nomagicโ disables magic number negotiation. With this, pppd cannot detect a looped-back line โ ๏ธ. Only needed if the peer is buggy.nompโ disables PPP multilink. Currently Linux-only ๐ง.nomppeโ disables MPPE (Microsoft Point to Point Encryption). This is the default.nomppe-40โ disables 40-bit encryption with MPPE.nomppe-128โ disables 128-bit encryption with MPPE.nomppe-statefulโ disables MPPE stateful mode. This is the default.nompshortseqโ disables short (12-bit) sequence numbers in PPP multilink protocol, forcing 24-bit sequence numbers instead. Linux-only, and only has any effect if multilink is enabled ๐.nomultilinkโ disables PPP multilink. Currently Linux-only ๐ง.nopcompโ disables protocol field compression negotiation in both the receive and the transmit direction ๐.nopersistโ exit once a connection has been made and terminated. This is the default unless thepersistordemandoption has been specified ๐.nopredictor1โ do not accept or agree to Predictor-1 compression ๐ซ.noproxyarpโ disables theproxyarpoption. Sysadmins who want to stop users from creating proxy ARP entries with pppd can do exactly that by dropping this option into/etc/ppp/options๐ก๏ธ.noremoteipโ lets pppd operate without having an IP address for the peer. Linux-only. Normally pppd requests the peer's IP address, and if the peer doesn't supply it, pppd uses an arbitrary address in the10.x.x.xsubnet. With this option, if the peer doesn't supply its IP address, pppd won't ask for it and won't set the destination address of the ppp interface. In that situation the ppp interface can still be used for routing by creating device routes โ but the peer itself can't be addressed directly for IP traffic ๐ซถ.nosendipโ bestie, this one means we don't hand our local IP address over to the peer during IP address negotiation. Keep it to ourselves, periodt. ๐nostrict-script-checksโ turns offstrict-script-checks. This option is privileged. โ ๏ธnostrict-secrets-filesโ turns offstrict-secrets-files. This option is privileged too. โ ๏ธnottyโ okay so normallypppdneeds a terminal device, it's kind of its whole thing. With this option it does NOT. Insteadpppdallocates itself a pseudo-tty master/slave pair and uses the slave as its terminal device. Then it spawns a child process to act as acharacter shuntthat transfers characters between the pseudo-tty master and its standard input and output. The way that works out is:pppdtransmits characters on its standard output and receives characters on its standard input even if those aren't terminal devices at all. The catch? It increases the latency and CPU overhead of transferring data over the ppp interface, because literally every character sent and received has to flow through the character shunt process. ๐ And an explicit device name may not be given if this option is used.novjโ no Van Jacobson style TCP/IP header compression, in both the transmit and the receive direction. Bye. ๐novjccompโ disables the connection-ID compression option inside Van Jacobson style TCP/IP header compression. With this one,pppdwill not omit the connection-ID byte from Van Jacobson compressed TCP/IP headers, and it won't ask the peer to do it either. ๐papcryptโ says that all the secrets in the/etc/ppp/pap-secretsfile which get used for checking the identity of the peer are encrypted, sopppdshould not accept a password which โ before encryption โ is identical to the secret from/etc/ppp/pap-secrets. ๐pap-max-authreqn โ sets the maximum number of PAP authenticate-request transmissions to n (default10). โจpap-restartn โ sets the PAP restart interval (that's the retransmission timeout, iykyk) to n seconds (default3). โฑ๏ธpap-timeoutn โ sets the maximum timepppdwill wait for the peer to authenticate itself with PAP to n seconds.0means no limit, bestie โ no cap, no timer, no stress. ๐pass-filterfilter-expression โ specifies a packet filter to be applied to data packets being sent or received, to determine which packets should be allowed to pass. Packets rejected by the filter are silently discarded โ not even a text back. ๐ญ This option can be used to stop specific network daemons (likerouted) from eating up link bandwidth, or to give you a very basic firewall capability.
The filter-expression syntax is as described for tcpdump(1), except that qualifiers which are inappropriate for a PPP link โ like ether and arp โ are not permitted. ๐
โโ๏ธ Generally the filter expression should be enclosed in single-quotes so the shell doesn't go interpreting the whitespace inside the expression. Note that you can apply different constraints to incoming and outgoing packets using the inbound and outbound qualifiers. This option is currently only available under Linux, and it requires that the kernel was configured to include PPP filtering support (CONFIG_PPP_FILTER). ๐ง
passwordpassword-string โ specifies the password to use for authenticating to the peer. Use of this option is discouraged, because the password is likely to be visible to other users on the system (for example, by usingps(1)). ๐ Like, the whole group chat can see it. Don't.persistโ do not exit after a connection is terminated; instead try to reopen the connection. Iconic. Themaxfailoption still has an effect on persistent connections, so keep that in mind. ๐ฅpkcs12pkcs12file โ (EAP-TLS) read credentials for client-side EAP-TLS authentication from the file pkcs12file in PKCS12 format. This option is an alternative to thecertandkeyoptions. This option is privileged. ๐pluginfilename โ load the shared library object file filename as a plugin. This is a privileged option. If filename doesn't contain a slash (/),pppdwill look in the/usr/lib/pppd/versiondirectory for the plugin, where version is the version number ofpppd(for example,2.4.2). ๐ฆpredictor1โ requests that the peer compress frames that it sends using Predictor-1 compression, and agrees to compress transmitted frames with Predictor-1 if requested. This option has no effect unless the kernel driver supports Predictor-1 compression. ๐privgroupgroup-name โ allows members of group group-name to use privileged options. This is a privileged option. Use it with care, bestie, because there is no guarantee that members of group-name cannot usepppdto become root themselves. Consider it equivalent to putting the members of group-name in thekmemordiskgroup. ๐ณ Like, that's real power, handle responsibly.proxyarpโ adds 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. The effect is that the peer appears to other systems to be on the local ethernet. It's giving main character on the LAN. ๐ptyscript โ specifies that the command script is to be used to communicate, rather than a specific terminal device.pppdwill allocate itself a pseudo-tty master/slave pair and use the slave as its terminal device. The script 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. (Note: if therecordoption is used in conjunction with theptyoption, the child process will have pipes on its standard input and output.) ๐ซถ
It is important to note that script will be executed by passing it to /bin/sh using -c, such that if script contains arguments /bin/sh may attempt to interpret that โ and thus any arguments should be escaped to avoid shell expansion. ๐จ
receive-allโ with this option,pppdwill accept all control characters from the peer, including those marked in the receive asyncmap. Without this option,pppdwill discard those characters as specified in RFC1662. This option should only be needed if the peer is buggy. ๐ Yes, we're being nice to the buggy peer.recordfilename โ specifies thatpppdshould record all characters sent and received to a file named filename. 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 thepppdump(8)program. ๐ผโจremotenamename โ sets the assumed name of the remote system, for authentication purposes, to name. ๐ท๏ธremotenumbernumber โ sets the assumed telephone number of the remote system, for authentication purposes, to number. โ๏ธrefuse-chapโ with this option,pppdwill not agree to authenticate itself to the peer using CHAP. ๐ โโ๏ธrefuse-mschapโ with this option,pppdwill not agree to authenticate itself to the peer using MS-CHAP. ๐ โโ๏ธrefuse-mschap-v2โ with this option,pppdwill not agree to authenticate itself to the peer using MS-CHAPv2. ๐ โโ๏ธrefuse-eapโ with this option,pppdwill not agree to authenticate itself to the peer using EAP. ๐ โโ๏ธrefuse-papโ with this option,pppdwill not agree to authenticate itself to the peer using PAP. ๐ โโ๏ธrequire-chapโ requires the peer to authenticate itself using CHAP [Challenge Handshake Authentication Protocol] authentication. No CHAP, no chat. ๐require-mppeโ requires the use of MPPE (Microsoft Point to Point Encryption). This option disables all other compression types. It enables both40-bitand128-bitencryption. In order for MPPE to successfully come up, you must have authenticated with either MS-CHAP or MS-CHAPv2. ๐ This option is presently only supported under Linux, and only if your kernel has been configured to include MPPE support. ๐งrequire-mppe-40โ requires the use of MPPE, with40-bitencryption. ๐require-mppe-128โ requires the use of MPPE, with128-bitencryption. ๐ฅrequire-mschapโ requires the peer to authenticate itself using MS-CHAP [Microsoft Challenge Handshake Authentication Protocol] authentication. ๐require-mschap-v2โ requires the peer to authenticate itself using MS-CHAPv2 [Microsoft Challenge Handshake Authentication Protocol, Version 2] authentication. ๐require-eapโ requires the peer to authenticate itself using EAP [Extensible Authentication Protocol] authentication. ๐ธrequire-papโ requires the peer to authenticate itself using PAP [Password Authentication Protocol] authentication. ๐setname=value โ sets an environment variable for scripts that are invoked bypppd. When set by a privileged source, the variable specified by name cannot be changed by options contained in an unprivileged source. See also theunsetoption and the environment described in SCRIPTS. ๐show-passwordโ when logging the contents of PAP packets, this option causespppdto show the password string in the log message. ๐ซฃ Bestie. It's literally in the log. (Seepasswordabove, same energy.)silentโ with this option,pppdwill not transmit LCP packets to initiate a connection until a valid LCP packet is received from the peer (as for thepassiveoption with ancient versions ofpppd). ๐คซ Waiting to be spoken to first, honestly relatable.srp-intervaln โ if this parameter is given andpppduses EAP SRP-SHA1 to authenticate the peer (i.e., it is the server), thenpppdwill use the optional lightweight SRP rechallenge mechanism at intervals of n seconds. This option is faster thaneap-intervalreauthentication, because it uses a hash-based mechanism and does not derive a new session key. โก Slay, efficiency.srp-pn-secretstring โ sets the long-term pseudonym-generating secret for the server. This value is optional, and if it's set, it needs to be known at the server (authenticator) side only, and should be different for each server (or poll of identical servers). It's used along with the current date to generate a key to encrypt and decrypt the client's identity contained in the pseudonym. ๐๐ฆ
srp-use-pseudonymโ when you're out here operating as an EAP SRP-SHA1 client, this makes pppd try the pseudonym stored in~/.ppp_pseudonymfirst as the identity ๐ and also save into that file any pseudonym the peer hands over during authentication. iykyk.stop-bits nโ sets how many stop bits the serial port rocks. valid values are1or2, and the default is1. that's it, that's the whole vibe.strict-script-checksโ bestie this one is on by default and it's a whole security moment โจ it enforces stricter rules on scripts, specifically: they must be owned by root (or the effective id), and they must not be writable by either group or other. the option itself is not privileged โ but the inversenostrict-script-checks(to disable the checks) is. this switches from usingexecve()when invoking scripts to usingexecveat(), which means we perform the relevant checks on the file we are guaranteed to exec to ๐ซถ with the caveat that if these are scripts with shebangs (#!) then$0(argv[0]) will be lost โ so your scripts should either know who/what they are, or rely on thePPP_SCRIPT_INSTANCEenvironment variable. on Solaris and illumos, which cannot execute a#!script through a file descriptor, scripts are executed by path instead, after checking that the path still refers to the file that was checked. no cap.strict-secrets-filesโ also on by default, and it will straight up refuse to operate using secrets files that are group or world readable ๐ this option is not privileged, but its inverse (nostrict-secrets-files) is. keep ur secrets secret fr fr.syncโ use synchronous HDLC serial encoding instead of asynchronous. the device pppd uses with this option must have sync support. currently supports Microgate SyncLink adapters under Linux and FreeBSD 2.2.8 and later ๐tls-verify-method stringโ (EAP-TLS, or PEAP) match the value specified forremotenameto that of the X509 certificate's subject name, common name, or suffix of the common name. the respective values allowed for this option are:none,subject,name, orsuffix. the default value isnone. this option is privileged ๐ฅtls-verify-key-usageโ (EAP-TLS, or PEAP) enables examination of peer certificate's purpose, and extended key usage attributes. if this option is given, pppd will require that the peer's certificate is suitable for use for TLS authentication as a client (regardless of whether pppd is authenticating the peer, or being authenticated). this option is privileged ๐unit numโ sets the ppp unit number (like for appp0orppp1etc interface name) for outbound connections. if the unit is already in use, a dynamically allocated number will be used instead. sharing is caring ig.ifname stringโ set the ppp interface name for outbound connections. if the interface name is already in use, or if the name cannot be used for any other reason, pppd will terminate ๐ so like, pick carefully.vrf nameโ bind the ppp interface to the existing VRF (Virtual Routing and Forwarding) instance name on Linux. routes installed by pppd will go into the routing table of VRFnameinstead of the default table. this option is only available on Linux systems that support VRF ๐งunset nameโ remove a variable from the environment variables for scripts that are invoked by pppd. when specified by a privileged source, the variable name cannot be set by options contained in an unprivileged source. see also thesetoption and the environment described in SCRIPTS ๐updetachโ with this option, pppd will detach from its controlling terminal once it has successfully established the ppp connection (to the point where the first network control protocol, usually the IP control protocol, has come up). main character exit โจup_sdnotifyโ use this option to run pppd in systemd service units ofType=notify(up_sdnotifyimpliesnodetach). whenup_sdnotifyis enabled, pppd will notify systemd once it has successfully established the ppp connection (to the point where the first network control protocol, usually the IP control protocol, has come up). this option is only available when pppd is compiled with systemd support ๐งusehostnameโ enforce the use of the hostname (with domain name appended, if given) as the name of the local system for authentication purposes (overrides thenameoption). this option is not normally needed since thenameoption is privileged. extra, but valid ๐usepeerdnsโ ask the peer for up to2DNS server addresses. the addresses supplied by the peer (if any) are passed to the/etc/ppp/ip-upscript in the environment variablesDNS1andDNS2, and the environment variableUSEPEERDNSwill be set to1. in addition, pppd will create an/etc/ppp/resolv.conffile containing one or two nameserver lines with the address(es) supplied by the peer (unless thenoresolvconfoption is given). slay ๐usepeerwinsโ ask the peer for up to2WINS server addresses. the addresses supplied by the peer (if any) are passed to the/etc/ppp/ip-upscript in the environment variablesWINS1andWINS2, and the environment variableUSEPEERWINSwill be set to1.
please note that some modems (like the Huawei E220) requires this option in order to avoid a race condition that results in the incorrect DNS servers being assigned. ๐ noted, bestie.
noresolvconfโ do not create the/etc/ppp/resolv.conffile. simple as that ๐user nameโ sets the name used for authenticating the local system to the peer toname. ur whole identity, but for PPP.vj-max-slots nโ sets the number of connection slots to be used by the Van Jacobson TCP/IP header compression and decompression code ton, which must be between2and16(inclusive). no zero, no seventeen, we stay in range ๐welcome scriptโ run the executable or shell command specified byscriptbefore initiating PPP negotiation, after theconnectscript (if any) has completed. a value for this option from a privileged source cannot be overridden by a non-privileged user ๐ซถxonxoffโ use software flow control (i.e. XON/XOFF) to control the flow of data on the serial port. old school but iconic ๐
๐ธ PPPOE OPTIONS ๐ธ
to establish a PPP link over Ethernet (PPPoE) it is needed to load pppd's plugin pppoe.so and then specify option nic-interface instead of modem options ttyname and speed. recognized pppd's PPPoE options are: ๐ฆ
nic-interfaceโ use the ethernet deviceinterfaceto communicate with the peer. for example, establishing a PPPoE link oneth0interface is done by specifying pppd's optionnic-eth0. the prefixnic-for this option may be avoided if the interface name is unambiguous and does not look like any other pppd's option. iykyk โจpppoe-service nameโ connect to specified PPPoE servicename. for backward compatibility alsorp_pppoe_serviceoption name is supported.pppoe-ac nameโ connect to specified PPPoE access concentratorname. for backward compatibility alsorp_pppoe_acoption name is supported.pppoe-sess sessid:macaddrโ attach to existing PPPoE session. for backward compatibility alsorp_pppoe_sessoption name is supported.pppoe-verbose nโ be verbose about discovered access concentrators. when set to2or bigger value then dump also discovery packets. for backward compatibility alsorp_pppoe_verboseoption name is supported. ๐pppoe-mac macaddrโ connect to specified MAC address.pppoe-host-uniq stringโ set the PPPoE Host-Uniq tag to the supplied hex string. by default the PPPoE Host-Uniq tag is set to the pppd's process PID. for backward compatibility this option may be specified without thepppoe-prefix ๐pppoe-padi-timeout nโ initial timeout for discovery packets in seconds (default5).pppoe-padi-attempts nโ number of discovery attempts (default3). third time's the charm fr fr.
๐ OPTIONS FILES ๐
okay so options don't just come from the command line โ they can be taken from files as well ๐ pppd reads options from the files /etc/ppp/options, ~/.ppprc and /etc/ppp/options.ttyname (in that order) before processing the options on the command line. (in fact, the command-line options are scanned to find the terminal name before the options.ttyname file is read.) in forming the name of the options.ttyname file, the initial /dev/ is removed from the terminal name, and any remaining / characters are replaced with dots. cute, right? ๐ฆ
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 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 file or call options within an options file โจ
๐ SECURITY ๐
okay bestie, security arc time ๐ pppd lowkey gives system administrators enough access control that you can hand out PPP access to a server machine to legit users without spiraling into โoops we compromised the server or the whole networkโ territory. iconic. this control comes from restrictions on which IP addresses the peer may use, based on its authenticated identity (if any), and from restrictions on which options a non-privileged user may use. several of pppdโs options are privileged, especially the ones that permit potentially insecure configurations ๐จ these options are only accepted in files under the system administratorโs control, or if pppd is being run by root.
if pppd is run by a non-privileged user, by default the peer must authenticate itself, and the IP address(es) it may use are controlled by the secrets file entry used to authenticate it. for the peer not to be required to authenticate itself, either pppd must be run by root or a privileged options file containing the noauth option must be invoked. no cap.
as indicated above, some security-sensitive options are privileged, which means they may not be used by an ordinary non-privileged user running a setuid-root pppd โ not on the command line, not in the userโs ~/.ppprc file, and not in an options file read using the file option. privileged options may be used in /etc/ppp/options or in an options file read using the call option. if pppd is being run by the root user, privileged options can be used without restriction. slay for root, I guess ๐
on Linux, pppd does not have to be run by root: it will also run when it has the CAP_NET_ADMIN capability, which is what the kernel requires in order to open /dev/ppp and to configure network interfaces. pppd can thus be run unprivileged under a service manager or in a container which grants it that capability, and privileged options can then be used without restriction, as for root. this does not apply to a pppd which is setuid-root or setgid, or which has file capabilities set on it, and is invoked by a non-privileged user, since there the privilege comes from the way the binary is installed rather than from the user running it; such a pppd is restricted as described above. read that twice, bestie ๐ซถ
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 call 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. itโs giving very deliberate permissions energy โจ
๐ต๏ธ AUTHENTICATION ๐ต๏ธ
authentication is the process whereby one peer convinces the other of its identity. this involves the first peer sending its name to the other, together with some kind of secret information which could only come from the genuine authorized user of that name. in such an exchange, weโll call the first peer the โclientโ and the other the โserver.โ the client has a name by which it identifies itself to the server, and the server also has a name by which it identifies itself to the client. generally the genuine client shares some secret (or password) with the server, and authenticates itself by proving that it knows that secret. very often, the names used for authentication correspond to the internet hostnames of the peers, but this is not essential. okay so itโs basically โprove youโre youโ but with packets ๐ฅ
at present, pppd supports three authentication protocols: the Password Authentication Protocol (PAP), Challenge Handshake Authentication Protocol (CHAP), and Extensible Authentication Protocol (EAP). PAP involves the client sending its name and a cleartext password to the server to authenticate itself ๐ฌ in contrast, the server initiates the CHAP authentication exchange by sending a challenge to the client (the challenge packet includes the serverโs name). the client must respond with a response which includes its name plus a hash value derived from the shared secret and the challenge, in order to prove that it knows the secret. EAP supports CHAP-style authentication, and also includes the SRP-SHA1 mechanism, which is resistant to dictionary-based attacks and does not require a cleartext password on the server side. we love a glow-up in security ๐
the PPP protocol, being symmetrical, allows both peers to require the other to authenticate itself. in that case, two separate and independent authentication exchanges will occur. the two exchanges could use different authentication protocols, and in principle, different names could be used in the two exchanges. mutual auth is main character energy, fr fr ๐
the default behaviour of pppd is to agree to authenticate if requested. however, pppd will not agree to authenticate itself with a particular protocol if it has no secrets which could be used to do so. itโs not being shady, it literally canโt.
pppd stores secrets for use in authentication in secrets files:
/etc/ppp/pap-secretsfor PAP/etc/ppp/chap-secretsfor CHAP, MS-CHAP, MS-CHAPv2, and EAP MD5-Challenge/etc/ppp/srp-secretsfor EAP SRP-SHA1
all secrets files have the same format. the secrets files can contain secrets for pppd to use in authenticating itself to other systems, as well as secrets for pppd to use when authenticating other systems to itself ๐
each line in a secrets file contains one secret. a given secret is specific to a particular combination of client and server โ it can only be used by that client to authenticate itself to that server. thus each line in a secrets file has at least 3 fields: the name of the client, the name of the server, and the secret. these fields may be followed by a list of the IP addresses that the specified client may use when connecting to the specified server. bestie, itโs a whole little row of facts ๐ธ
a secrets file is parsed into words as for a options file, so the client name, server name and secrets fields must each be one word, with any embedded spaces or other special characters quoted or escaped. note that case is significant in the client and server names and in the secret. capital letters are not doing decorative work here, they matter ๐
if the secret starts with an @, what follows is assumed to be the name of a file from which to read the secret. a * as the client or server name matches any name. when selecting a secret, pppd takes the best match, i.e. the match with the fewest wildcards. lowkey a matching algorithm with taste โจ
any following words on the same line are taken to be a list of acceptable IP addresses for that client. if there are only 3 words on the line, or if the first word is -, then all IP addresses are disallowed. to allow any address, use *. a word starting with ! indicates that the specified address is not acceptable. an address may be followed by / and a number n, to indicate a whole subnet, i.e. all addresses which have the same value in the most significant n bits. in this form, the address may be followed by a plus sign (+) to indicate that one address from the subnet is authorized, based on the ppp network interface unit number in use. in this case, the host part of the address will be set to the unit number plus one. thatโs the whole IP-address tea, no skipping ๐ซ
thus a secrets file contains both secrets for use in authenticating other hosts, plus secrets which we use for authenticating ourselves to others. when pppd is authenticating the peer (checking the peerโs identity), it chooses a secret with the peerโs name in the first field and the name of the local system in the second field. the name of the local system defaults to the hostname, with the domain name appended if the domain option is used. this default can be overridden with the name option, except when the usehostname option is used. (for EAP SRP-SHA1, see the srp-entry(8) utility for generating proper validator entries to be used in the โsecretโ field.) yes bestie, that srp-entry(8) reference stays, itโs iconic in a nerdy way ๐ง
when pppd is choosing a secret to use in authenticating itself to the peer, it first determines what name it is going to use to identify itself to the peer. this name can be specified by the user with the user option. if this option is not used, the name defaults to the name of the local system, determined as described in the previous paragraph. then pppd looks for a secret with this name in the first field and the peerโs name in the second field. pppd will know the name of the peer if CHAP or EAP authentication is being used, because the peer will have sent it in the challenge packet. however, if PAP is being used, pppd will have to determine the peerโs name from the options specified by the user. the user can specify the peerโs name directly with the remotename option. otherwise, if the remote IP address was specified by a name (rather than in numeric form), that name will be used as the peerโs name. failing that, pppd will use the null string as the peerโs name. itโs giving โweโll figure it outโ and honestly same ๐ญ
when authenticating the peer with PAP, the supplied password is first compared with the secret from the secrets file. if the password doesnโt match the secret, the password is encrypted using crypt() and checked against the secret again. thus secrets for authenticating the peer can be stored in encrypted form if desired. if the papcrypt option is given, the first (unencrypted) comparison is omitted, for better security. security said โskip the first pass, bestieโ ๐
furthermore, if the login option was specified, the username and password are also checked against the system password database. thus, the system administrator can set up the pap-secrets file to allow PPP access only to certain users, and to restrict the set of IP addresses that each user can use. typically, when using the login option, the secret in /etc/ppp/pap-secrets would be "", which will match any password supplied by the peer. this avoids the need to have the same secret in two places. very โdonโt duplicate your homeworkโ of it all ๐
authentication must be satisfactorily completed before IPCP (or any other Network Control Protocol) can be started. if the peer is required to authenticate itself, and fails to do so, pppd will terminate the link (by closing LCP). if IPCP negotiates an unacceptable IP address for the remote host, IPCP will be closed. IP packets can only be sent or received when IPCP is open. no auth, no IPCP, no packets โ the pipeline is locked ๐
in some cases it is desirable to allow some hosts which canโt authenticate themselves to connect and use one of a restricted set of IP addresses, even when the local host generally requires authentication. if the peer refuses to authenticate itself when requested, pppd takes that as equivalent to authenticating with PAP using the empty string for the username and password. thus, by adding a line to the pap-secrets file which specifies the empty string for the client and password, it is possible to allow restricted access to hosts which refuse to authenticate themselves. thatโs the loophole, but itโs a very documented and intentional loophole, bestie ๐
๐ฃ๏ธ ROUTING ๐ฃ๏ธ
ok so the moment IPCP negotiation finishes successfully, pppd goes and tells the kernel the local and remote IP addresses for the ppp interface. and that alone is literally enough to create a host route to the remote end of the link, which is what lets the two peers exchange IP packets ๐ซถ.
but talking to other machines? yeah that generally needs more work โ further modification to routing tables and/or ARP (Address Resolution Protocol) tables, bestie. most of the time the defaultroute and/or proxyarp options are enough to handle it, but sometimes you gotta intervene more, and that's what the /etc/ppp/ip-up script is for โจ.
sometimes you want a default route through the remote host โ like when a machine's only connection to the Internet is through the ppp interface. the defaultroute option makes pppd create that default route when IPCP comes up, and delete it when the link is terminated. clean up after yourself, queen ๐
.
and in some cases proxy ARP is the move โ for example on a server machine connected to a LAN, so other hosts can communicate with the remote host. the proxyarp option makes pppd look for a network interface on the same subnet as the remote host (an interface supporting broadcast and ARP, which is up and not a point-to-point or loopback interface). if it finds one, pppd creates a permanent, published ARP entry with the IP address of the remote host and the hardware address of the network interface it found. iconic behavior fr ๐ฅ.
ok now the demand option situation: when you use it, the interface IP addresses have already been set by the time IPCP comes up. so if pppd couldn't negotiate the same addresses it used to configure the interface (say, when the peer is an ISP doing dynamic IP address assignment), pppd has to change the interface IP addresses over to the negotiated ones. that can disrupt existing connections ๐ญ โ and using demand dialling with peers that do dynamic IP address assignment is not recommended. consider this your vibe check.
๐ MULTILINK ๐
Multilink PPP is the capability to combine two or more PPP links between a pair of machines into a single bundle, which shows up as one virtual PPP link with the combined bandwidth of the individual links. so much power ๐ช. currently, multilink PPP is only supported under Linux.
pppd figures out that the link it's controlling is connected to the same peer as another link using the peer's endpoint discriminator plus the authenticated identity of the peer (if it authenticates itself). the endpoint discriminator is a block of data that's hopefully unique for each peer. several types of data can be used, including locally-assigned strings of bytes, IP addresses, MAC addresses, randomly strings of bytes, or E-164 phone numbers ๐. the endpoint discriminator pppd sends to the peer can be set with the endpoint option.
sometimes though the peer sends no endpoint discriminator, or a non-unique value ๐. that's where the bundle option comes in โ it adds an extra string that gets added to the peer's endpoint discriminator and authenticated identity when matching up links to be joined together in a bundle. the bundle option can also be used to allow the establishment of multiple bundles between the local system and the peer. pppd uses a TDB database in /var/run/pppd2.tdb to match up links. fancy โจ.
so assuming multilink is enabled and the peer is willing to negotiate multilink: when pppd is invoked to bring up the first link to the peer, it detects that no other link is connected to the peer and creates a new bundle โ that is, another ppp network interface unit. then when another pppd is invoked to bring up another link to the peer, it detects the existing bundle and joins its link to it. teamwork makes the dream work ๐ซถ.
if the first link terminates (for example because of a hangup or a received LCP terminate-request), the bundle is not destroyed unless there are no other links remaining in the bundle. instead of exiting, the first pppd keeps running after its link terminates, until all the links in the bundle have terminated. and if the first pppd receives a SIGTERM or SIGINT signal, it will destroy the bundle and send a SIGHUP to the pppd processes for each of the links in the bundle. if the first pppd receives a SIGHUP signal, it will terminate its link but not the bundle. iykyk ๐
.
Note: demand mode is not currently supported with multilink. that's the whole note, no cap ๐.
๐ธ EXAMPLES ๐ธ
the following examples assume that the /etc/ppp/options file contains the auth option (as in the default /etc/ppp/options file in the ppp distribution).
probably the most common use of pppd is dialling out to an ISP ๐. you can do that with a command like
pppd call isp
where the /etc/ppp/peers/isp file is set up by the system administrator to contain something like this:
ttyS0 19200 crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'
noauth
in this example we're using chat to dial the ISP's modem and go through whatever logon sequence is required. the /etc/ppp/chat-isp file contains the script used by chat; it could for example contain something like this:
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "Username/Password Incorrect"
"" "at"
OK "at&d0&c1"
OK "atdt2468135"
"name:" "^Umyuserid"
"word:" "\qmypassword"
"ispts" "\q^Uppp"
"~-^Uppp-~"
see the chat(8) man page for details of chat scripts ๐.
pppd can also be used to provide a dial-in ppp service for users. if the users already have login accounts, the simplest way to set up the ppp service is to let users log in to their accounts and run pppd (installed setuid-root) with a command such as
pppd proxyarp
to allow a user to use the PPP facilities, you need to allocate an IP address for that user's machine and create an entry in /etc/ppp/pap-secrets, /etc/ppp/chap-secrets, or /etc/ppp/srp-secrets (depending on which authentication method the PPP implementation on the user's machine supports), so the user's machine can authenticate itself. for example, if Joe has a machine called "joespc" that's to be allowed to dial in to the machine called "server" and use the IP address joespc.my.net, you'd add an entry like this to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets:
joespc server "joe's secret" joespc.my.net
(see srp-entry(8) for a means to generate the server's entry when SRP-SHA1 is in use.) alternatively, you can create a username called (for example) "ppp", whose login shell is pppd and whose home directory is /etc/ppp. options to be used when pppd is run this way can be put in /etc/ppp/.ppprc โจ.
if your serial connection is any more complicated than a piece of wire, you may need to arrange for some control characters to be escaped. in particular it's often useful to escape XON (^Q) and XOFF (^S), using asyncmap a0000. if the path includes a telnet, you probably should escape ^] as well (asyncmap 200a0000). if the path includes an rlogin, you'll need to use the escape ff option on the end which is running the rlogin client, since many rlogin implementations are not transparent โ they will remove the sequence [0xff, 0xff, 0x73, 0x73, followed by any 8 bytes] from the stream ๐ญ. don't ask, just escape it.
๐ฉบ DIAGNOSTICS ๐ฉบ
messages are sent to the syslog daemon using facility LOG_DAEMON. (this can be overridden by recompiling pppd with the macro LOG_PPP defined as the desired facility.) see the syslog(8) documentation for details of where the syslog daemon will write the messages. on most systems, the syslog daemon uses the /etc/syslog.conf file to specify the destination(s) for syslog messages ๐. you may need to edit that file to suit. go off, sysadmin.
the debug option causes the contents of all control packets sent or received to be logged โ that is, all LCP, PAP, CHAP, EAP, or IPCP packets. this is super useful if the PPP negotiation doesn't succeed or if authentication fails ๐ต๏ธโโ๏ธ. if debugging is enabled at compile time, the debug option also causes other debugging messages to be logged.
debugging can also be enabled or disabled by sending a SIGUSR1 signal to the pppd process. that signal acts as a toggle ๐. love a toggle, honestly.
๐ช EXIT STATUS ๐ช
the exit status of pppd is set to indicate whether any error was detected, or the reason for the link being terminated. the values used are:
0โ Pppd has detached, or otherwise the connection was successfully established and terminated at the peer's request. โจ1โ An immediately fatal error of some kind occurred, such as an essential system call failing, or running out of virtual memory. ๐2โ An error was detected in processing the options given, such as two mutually exclusive options being used.3โ Pppd does not have the privileges required to run; that is, it is not being run by root, and (on Linux) does not have theCAP_NET_ADMINcapability. ๐4โ The kernel does not support PPP, for example, the PPP kernel driver is not included or cannot be loaded.5โ Pppd terminated because it was sent aSIGINT,SIGTERMorSIGHUPsignal.6โ The serial port could not be locked.7โ The serial port could not be opened. ๐ญ8โ The connect script failed (returned a non-zero exit status).9โ The command specified as the argument to theptyoption could not be run.10โ The PPP negotiation failed, that is, it didn't reach the point where at least one network protocol (e.g. IP) was running.11โ The peer system failed (or refused) to authenticate itself. rude.12โ The link was established successfully and terminated because it was idle. ๐ด13โ The link was established successfully and terminated because the connect time limit was reached.14โ Callback was negotiated and an incoming call should arrive shortly. ๐15โ The link was terminated because the peer is not responding to echo requests.16โ The link was terminated by the modem hanging up.17โ The PPP negotiation failed because serial loopback was detected. ๐18โ The init script failed (returned a non-zero exit status).19โ We failed to authenticate ourselves to the peer. ๐
okay so pppd hits up scripts at basically every stage of its whole journey โ those are called "site-specific ancillary processing" in the docs which is just fancy for "you get to do your own little custom thing here." ๐
these are usually shell scripts, but they could be executable code files instead, no judgement. and here's the thing: pppd does not wait for the scripts to finish โ except for the net-init, net-pre-up and ip-pre-up scripts, those three it actually sits and waits for. โณ
when pppd is running as root, the scripts are executed as root (with the real and effective user-id set to 0), so they can do things like update routing tables or run privileged daemons. otherwise they're executed with pppd's own user-id and inherit any ambient capabilities it has. ๐ซถ
โ ๏ธ be careful that the contents of these scripts do not compromise your system's security. like, genuinely. don't put your whole clown wig on in there.
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 env vars pppd sets are:
PPP_SCRIPT_INSTANCEโ the name of the intended script, as documented, not as referenced. for example, even if you setip-up-script /some/other/paththis variable will still beip-up. it's giving "i know what you meant" energy.DEVICEโ the name of the serial tty device being used.IFNAMEโ the name of the network interface being used.VRFโ the name of the VRF to which the ppp interface is bound. only set if the ppp interface has been bound to a VRF using thevrfoption.IPLOCALโ the IP address for the local end of the link. only set when IPCP has come up.IPREMOTEโ the IP address for the remote end of the link. only set when IPCP has come up.LLLOCALโ the Link-Local IPv6 address for the local end of the link. only set when IPV6CP has come up.LLREMOTEโ the Link-Local IPv6 address for the remote end of the link. only set when IPV6CP has come up.PEERNAMEโ the authenticated name of the peer. only set if the peer authenticates itself.REMOTENUMBERโ the remote's number as provided to pppd by theremotenumberoption. the meaning of this varies based on the type of connection โxl2tpdfor example can either provide the dialing number AVP or the remote's IP address, andpppoe-servertypically provides the MAC address.SPEEDโ the baud rate of the tty device.ORIG_UIDโ the real user-id of the user who invoked pppd.PPPLOGNAMEโ the username of the real user-id that invoked pppd. this one is always set, icon behaviour.
for the ip-down and auth-down scripts, pppd also sets the following variables giving statistics for the connection: ๐
CONNECT_TIMEโ the number of seconds from when the PPP negotiation started until the connection was terminated.BYTES_SENTโ the number of bytes sent (at the level of the serial port) during the connection.BYTES_RCVDโ the number of bytes received (at the level of the serial port) during the connection.LINKNAMEโ the logical name of the link, set with thelinknameoption.CALL_FILEโ the value of thecalloption.DNS1โ if the peer supplies DNS server addresses, this variable is set to the first DNS server address supplied (whether or not theusepeerdnsoption was given).DNS2โ if the peer supplies DNS server addresses, this variable is set to the second DNS server address supplied (whether or not theusepeerdnsoption was given).WINS1โ if the peer supplies WINS server addresses, this variable is set to the first WINS server address supplied.WINS2โ if the peer supplies WINS server addresses, this variable is set to the second WINS server address supplied.ACNAMEโ if thepppoeplugin is used to establish a connection to an access concentrator (AC), this variable is set to the name of the AC, as supplied by the AC.
pppd invokes the following scripts, if they exist. it is not an error if they don't exist โ no drama, no crumbs left behind. ๐ฆ
๐ /etc/ppp/auth-up
a program or script which is executed after the remote system successfully authenticates itself. it's executed with the parameters:
interface-name peer-name user-name tty-device speed ipparam
note that this script is not executed if the peer doesn't authenticate itself โ for example when the noauth option is used.
override option: auth-up-script /alternative/path
๐ /etc/ppp/auth-down
a program or script which is executed when the link goes down, if /etc/ppp/auth-up was previously executed. it's executed in the same manner with the same parameters as /etc/ppp/auth-up.
override option: auth-down-script /alternative/path
๐ /etc/ppp/ip-pre-up
a program or script which is executed just before the ppp network interface is brought up. it's executed with the same parameters as the ip-up script (below). at this point the interface exists and has IP addresses assigned but is still down. this can be used to add firewall rules before any IP traffic can pass through the interface. pppd will wait for this script to finish before bringing the interface up, so this script should run quickly. ๐โโ๏ธ๐จ
๐จ WARNING: please note that on systems where a single interface carries multiple protocols (Linux)ip-pre-upis NOT actually guaranteed to execute prior to the interface moving into an up state. although IP information won't be known, you should consider usingnet-pre-upinstead โ alternatively, disable other NCPs such that IPv4 is the only negotiated protocol, which will also result in a guarantee thatip-pre-upis called prior to the interface going into an UP state.
override option: ip-pre-up-script /alternative/path
๐ /etc/ppp/ip-up
a program or script which is executed when the link is available for sending and receiving IP packets (that is, IPCP has come up). it's executed with the parameters:
interface-name tty-device speed local-IP-address remote-IP-address ipparam
override option: ip-up-script /alternative/path
๐ /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 and /etc/ppp/ip-pre-up scripts. it's invoked in the same manner and with the same parameters as the ip-up script.
override option: ip-down-script /alternative/path
๐ /etc/ppp/ipv6-up
like /etc/ppp/ip-up, except that it's executed when the link is available for sending and receiving IPv6 packets. it's executed with the parameters:
interface-name tty-device speed local-link-local-address remote-link-local-address ipparam
override option: ipv6-up-script /alternative/path
๐ /etc/ppp/ipv6-down
similar to /etc/ppp/ip-down, but it's executed when IPv6 packets can no longer be transmitted on the link. it's executed with the same parameters as the ipv6-up script.
override option: ipv6-down-script /alternative/path
๐ /etc/ppp/net-init
this script will be executed the moment the ppp unit number is known. this script will be waited for and should not cause significant delays. โฐ this can be used to update book-keeping type systems external to ppp and provides the only guaranteed point where a script can be executed knowing the ppp unit number prior to LCP being initiated. it's executed with the parameters:
interface-name tty-device speed ipparam
override option: net-init-script /alternative/path
๐ /etc/ppp/net-pre-up
this script will be executed just prior to NCP negotiations initiating, and is guaranteed to be executed whilst the interface (Linux) and/or sub-interfaces (Solaris) as the case may be is/are still down. ppp will block waiting for this script to complete, and the interface may be safely renamed in this script (using for example ip li set dev $1 name ppp-foobar. the parameters are the same as for net-init.
override option: net-pre-up-script /alternative/path
๐ /etc/ppp/net-down
this script will be executed just prior to ppp terminating and will not be waited for. the parameters are the same as for net-init.
override option: net-down-script /alternative/path
๐ OTHER FILES ๐
/var/run/pppn.pid(BSD or Linux),/etc/ppp/pppn.pid(others) โ process-ID for pppd process on ppp interface unit n./var/run/ppp-name.pid(BSD or Linux),/etc/ppp/ppp-name.pid(others) โ process-ID for pppd process for logical link name (see thelinknameoption)./var/run/pppd2.tdbโ database containing information about pppd processes, interfaces and links, used for matching links to bundles in multilink operation. may be examined by external programs to obtain information about running pppd instances, the interfaces and devices they're using, IP address assignments, etc. it's giving little black book of pppd ๐/etc/ppp/pap-secretsโ usernames, passwords and IP addresses for PAP authentication. this file should be owned by root and not readable or writable by any other user. pppd will log a warning if this is not the case./etc/ppp/chap-secretsโ names, secrets and IP addresses for CHAP/MS-CHAP/MS-CHAPv2 authentication. as for/etc/ppp/pap-secrets, this file should be owned by root and not readable or writable by any other user. pppd will log a warning if this is not the case./etc/ppp/srp-secretsโ names, secrets, and IP addresses for EAP authentication. as for/etc/ppp/pap-secrets, this file should be owned by root and not readable or writable by any other user. pppd will log a warning if this is not the case.~/.ppp_pseudonymโ saved client-side SRP-SHA1 pseudonym. see thesrp-use-pseudonymoption for details. ๐ต๏ธโโ๏ธ/etc/ppp/optionsโ system default options for pppd, read before user default options or command-line options.~/.ppprcโ user default options, read before/etc/ppp/options.ttyname./etc/ppp/options.ttynameโ system default options for the serial port being used, read after~/.ppprc. in forming the ttyname part of this filename, an initial/dev/is stripped from the port name (if present), and any slashes in the remaining part are converted to dots. ๐/etc/ppp/peersโ a whole directory of options files that are allowed to contain privileged options, even whenpppdwas invoked by somebody who is not root. bestie, this is the trust-fall directory ๐ซถ The system administrator can drop options files in here so non-privileged users can dial out without needing the peer to authenticate โ but only to certain trusted peers. So like, curated access, not a free-for-all. ๐
โจ SEE ALSO โจ
and the reading list, because she's well-read obviously ๐โจ
RFC1144โ Jacobson, V. Compressing TCP/IP headers for low-speed serial links. February 1990.RFC1321โ Rivest, R. The MD5 Message-Digest Algorithm. April 1992.RFC1332โ McGregor, G. PPP Internet Protocol Control Protocol (IPCP). May 1992.RFC1334โ Lloyd, B.; Simpson, W.A. PPP authentication protocols. October 1992.RFC1661โ Simpson, W.A. The Point-to-Point Protocol (PPP). July 1994.RFC1662โ Simpson, W.A. PPP in HDLC-like Framing. July 1994.RFC1990โ Sklower, K.; et al., The PPP Multilink Protocol (MP). August 1996.RFC2284โ Blunk, L.; Vollbrecht, J., PPP Extensible Authentication Protocol (EAP). March 1998.RFC2472โ Haskin, D. IP Version 6 over PPP December 1998.RFC2945โ Wu, T., The SRP Authentication and Key Exchange System September 2000.draft-ietf-pppext-eap-srp-03.txtโ Carlson, J.; et al., EAP SRP-SHA1 Authentication Protocol. July 2001.
๐ NOTES ๐
okay so, fun fact: you can actually steer a running pppd process a little bit, just by sending it a signal from this list. limited control, but control nonetheless. main character energy fr fr ๐
SIGINT,SIGTERMโ these makepppdterminate the link (by closing LCP, iconic), restore the serial device settings, and exit. and if a connector or disconnector process happens to be running at that moment,pppdwill send the very same signal to its process group, so the connector or disconnector process gets terminated too. teamwork, kinda ๐ญSIGHUPโ this one makespppdterminate the link, restore the serial device settings, and close the serial device. now here's the plot twist: if thepersistordemandoption has been specified,pppdwill try to reopen the serial device and start another connection (after the holdoff period). otherwise?pppdexits, periodt. and if this signal lands during the holdoff period, it makespppdend the holdoff period immediately. also, if a connector or disconnector process is running,pppdwill send the same signal to its process group.SIGUSR1โ toggles the state of thedebugoption. on. off. on. off. she's a light switch ๐SIGUSR2โ makespppdrenegotiate compression. genuinely useful, because it lets you re-enable compression after it got disabled as a result of a fatal decompression error. (and ngl, fatal decompression errors generally indicate a bug in one or other implementation. not naming names ๐)
๐ AUTHORS ๐
Paul Mackerras (paulus@ozlabs.org), based on earlier work by Drew Perkins, Brad Clements, Karl Fox, Greg Christy, and Brad Parker. legends, all of them ๐
๐ COPYRIGHT ๐
Pppd is copyrighted and made available under conditions which provide that it may be copied and used in source or binary forms, provided that the conditions listed below are met. Portions of pppd are covered by the following copyright notices:
Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved.
Copyright (c) 1993-2004 Paul Mackerras. All rights reserved.
Copyright (c) 1995 Pedro Roque Marques. All rights reserved.
Copyright (c) 1995 Eric Rosenquist. All rights reserved.
Copyright (c) 1999 Tommi Komulainen. All rights reserved.
Copyright (C) Andrew Tridgell 1999
Copyright (c) 2000 by Sun Microsystems, Inc. All rights reserved.
Copyright (c) 2001 by Sun Microsystems, Inc. All rights reserved.
Copyright (c) 2002 Google, Inc. All rights reserved.
The copyright notices contain the following statements. (yes bestie, this is the part where you sit up straight and read every word โ legal text does not do vibes ๐ซก)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The name "Carnegie Mellon University" must not be used to
endorse or promote products derived from this software without
prior written permission. For permission or any legal
details, please contact
Office of Technology Transfer
Carnegie Mellon University
5000 Forbes Avenue
Pittsburgh, PA 15213-3890
(412) 268-4387, fax: (412) 268-7395
tech-transfer@andrew.cmu.edu
3b. The name(s) of the authors of this software must not be used to
endorse or promote products derived from this software without
prior written permission.
4. Redistributions of any form whatsoever must retain the following
acknowledgements:
"This product includes software developed by Computing Services
at Carnegie Mellon University (http://www.cmu.edu/computing/)."
"This product includes software developed by Paul Mackerras
<paulus@ozlabs.org>".
"This product includes software developed by Pedro Roque Marques
<pedro_m@yahoo.com>".
"This product includes software developed by Tommi Komulainen
<Tommi.Komulainen@iki.fi>".
and then the ALL-CAPS part, which is giving very much "please read the fine print" energy:
CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL,
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ok that's genuinely the whole page, bestie โ every flag, every file, every RFC, every signal, every copyright line ๐
and that's a wrap on PPPD(8) ๐ฆ section 8 of the manual, version-and-date living down there in the footer where it belongs โ she said "I'm documented, I'm dated, I'm done" and honestly? slay. go forth and dial, and remember: read the fine print, keep your peers trusted, and never ignore a fatal decompression error ๐
โจ๐
๐ฆ where this page comes from
- arch rolling: ppp 2.5.5-1 ยท GPL-2.0-or-later AND BSD-3-Clause
- Copyright (c) 1993-2024 Paul Mackerras <paulus@ozlabs.org>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms