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, pppd will use that terminal, and will not fork to put itself in the background. A value for this option from a privileged source cannot be overridden by a non-privileged user. ๐Ÿซถ
  • 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 leading 0x) where the least significant bit (00000001) represents character 0 and the most significant bit (80000000) represents character 31. pppd will ask the peer to send these characters as a 2-byte escape sequence. If multiple asyncmap options are given, the values are ORed together. If no asyncmap option is given, the default is zero, so pppd will ask the peer not to escape any control characters. To escape transmitted characters, use the escape option. 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 if pppd is executed as a non-privileged user, unless the noauth option is in effect (since noauth is 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 as noauth, even if pppd is 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 for pppd to execute (by passing it to a shell) before attempting to start PPP negotiation. The chat (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 that pppd should set the serial port to use hardware flow control using the RTS and CTS signals in the RS-232 interface. If neither the crtscts, the nocrtscts, the cdtrcts nor the nocdtrcts option is given, the hardware flow control setting for the serial port is left unchanged. Some serial ports (such as Macintosh serial ports) lack a true RTS output. Such serial ports use this mode to implement unidirectional flow control. The serial port will suspend transmission when requested by the modem (via CTS) but will be unable to request the modem 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 the defaultroute. By default the default route will be added with a metric of 0. This option is privileged. ๐Ÿ“
  • disconnect script โ€” Execute the command specified by script, by passing it to a shell, after pppd has 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 the escape option, unlike the asyncmap option which only allows control characters to be specified. The characters which may not be escaped are those with hex values 0x20 - 0x3f or 0x5e. 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 invoked pppd. 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 the chat(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 that pppd should create a UUCP-style lock file for the serial device to ensure exclusive access to the device. By default, pppd will not create a lock file. Lock it down, bestie. ๐Ÿ”’
  • mru n โ€” Set the MRU [Maximum Receive Unit] value to n. pppd will ask the peer to send packets of no more than n bytes. The value of n must be between 128 and 16384; the default is 1500. A value of 296 works well on very slow links (40 bytes for TCP/IP header + 256 bytes of data). Note that for the IPv6 protocol, the MRU must be at least 1280. 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, pppd will 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 least 1280. Send it, but not too big. ๐Ÿ“ค
  • passive โ€” Enables the "passive" option in the LCP. With this option, pppd will attempt to initiate a connection; if no reply is received from the peer, pppd will 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 the noipdefault option 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, pppd will not accept a different value from the peer in the IPCP negotiation, unless the ipcp-accept-local and/or ipcp-accept-remote options 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 the ipv6cp-use-ipaddr option is given, the local identifier is the local IPv4 address and the remote identifier is the remote IPv4 address (see above). If the ipv6cp-use-remotenumber option is given, the remote identifier is set to the value from remotenumber option. On systems which supports a unique persistent id, such as EUI-48 derived from the Ethernet MAC address, ipv6cp-use-persistent option 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 the idle option if there are packets being sent or received regularly over the link (for example, routing information packets) which would otherwise prevent the link from ever appearing to be idle. The filter-expression syntax is as described for tcpdump(1), except that qualifiers which are inappropriate for a PPP link, such as ether and arp, 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 the inbound and outbound qualifiers. Filter it, but make it Linux. ๐Ÿ”
  • allow-ip address(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-number number โ€” 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.
  • bsdcomp nr,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. Use nobsdcomp or bsdcomp 0 to disable BSD-Compress compression entirely โœจ
  • ca ca-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 the cert and key options. Either ca or capath options are required for PEAP. EAP-TLS may also use the entry in eaptls-client or eaptls-server for a CA certificate associated with a particular peer. This option is privileged.
  • capath path โ€” (EAP-TLS, or PEAP) specify a location that contains public CA certificates ๐ŸŒธ either ca or capath options 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 the crtscts, the nocrtscts, the cdtrcts nor the nocdtrcts option is given, the hardware flow control setting for the serial port is left unchanged. Some serial ports (such as Macintosh serial ports) lack a true RTS output โ€” such serial ports use this mode to implement true bi-directional flow control. The sacrifice? This flow control mode does not permit using DTR as a modem control line ๐Ÿ˜ญ trade-offs, we hate to see it.
  • cert certfile โ€” (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 the ca and key options. This option is privileged.
  • chap-interval n โ€” if this option is given, pppd will rechallenge the peer every n seconds โฐ
  • chap-max-challenge n โ€” set the maximum number of CHAP challenge transmissions to n (default 10).
  • chap-restart n โ€” set the CHAP restart interval (retransmission timeout for challenges) to n seconds (default 3).
  • chap-timeout n โ€” 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-timeout n โ€” when exiting, wait for up to n seconds for any child processes (such as the command specified with the pty command) to exit before exiting. At the end of the timeout, pppd will send a SIGTERM signal to any remaining child processes and exit ๐Ÿ˜ค a value of 0 means no timeout โ€” that is, pppd will wait until all child processes have exited.
  • connect-delay n โ€” 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, pppd will commence negotiation by sending its first LCP packet. The default value is 1000 (1 second). This wait period only applies if the connect or pty option is used.
  • crl filename โ€” (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 the crl-dir option. This option is privileged.
  • crl-dir directory โ€” (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 the crl option. This option is privileged.
  • debug โ€” enables connection debugging facilities ๐Ÿ› if this option is given, pppd will log the contents of all control packets sent or received in a readable form. The packets are logged through syslog with facility daemon and level debug. This information can be directed to a file by setting up /etc/syslog.conf appropriately (see syslog.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, pppd will 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 the defaultroute6. By default the default route will be added with a metric of 0 ๐Ÿ’œ this option is privileged.
  • deflate nr,nt โ€” requests that the peer compress packets it sends using the Deflate scheme, with a maximum window size of 2**nr bytes, and agrees to compress packets sent to the peer with a maximum window size of 2**nt bytes โœจ 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. Use nodeflate or deflate 0 to disable Deflate compression entirely. (Note: pppd requests 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, pppd will use an arbitrary address in the 10.x.x.x range. pppd will initially configure the interface and enable it for IP traffic without connecting to the peer. When traffic is available, pppd will connect to the peer and perform negotiation, authentication, etc. When this is completed, pppd will 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.

  • domain d โ€” append the domain name d to the local host name for authentication purposes ๐ŸŽ€ for example, if gethostname() returns the name porsche, but the fully qualified domain name is porsche.Quotron.COM, you could specify domain Quotron.COM. pppd would then use the name porsche.Quotron.COM for 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 the dryrun option, pppd will 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 level info, and also printed to standard output unless the device on standard output is the device that pppd would be using to communicate with the peer. it's giving "let me check my fit before I leave the house" ๐Ÿ’…
  • dump โ€” with the dump option, pppd will print out all the option values which have been set ๐Ÿ“‹ this option is like the dryrun option except that pppd proceeds as normal rather than exiting. same energy, but it actually goes outside.
  • enable-session โ€” enables session accounting via PAM or wtwp/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/wtmpx entries are recorded regardless of whether the peer name identifies a valid user on the local system, making peers visible in the last(1) log ๐Ÿ‘€ this feature is automatically enabled when the pppd login option 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 and pppd authenticates the peer with EAP (i.e. it's the server), then pppd will restart EAP authentication every n seconds. For EAP SRP-SHA1, see also the srp-interval option โ€” that's the one that enables lightweight rechallenge. ๐ŸŽ€
  • eap-max-rreq n โ€” sets the max number of EAP Requests that pppd will respond to (as a client) without hearing EAP Success or Failure. Default is 20. โญ
  • eap-max-sreq n โ€” sets the max number of EAP Requests pppd will issue (as a server) while attempting authentication. Default is 10. ๐Ÿ”ฅ
  • eap-restart n โ€” sets the retransmit timeout for EAP Requests when acting as a server (authenticator). Default is 3 seconds. ๐Ÿ’œ
  • eap-timeout n โ€” sets the maximum time to wait for the peer to send an EAP Request when acting as a client (authenticatee). Default is 20 seconds. ๐ŸŒธ
  • hide-password โ€” when logging the contents of PAP packets, this makes pppd exclude 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 the persist or demand option 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 that pppd should 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 the persist option without the demand option. ๐Ÿ˜ญ

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, pppd will 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, pppd will 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 (default 10). โœจ
  • ipcp-max-failure n โ€” sets the max number of IPCP configure-NAKs returned before it starts sending configure-Rejects instead to n (default 100). ๐Ÿ”ฅ
  • ipcp-max-terminate n โ€” sets the max number of IPCP terminate-request transmissions to n (default 3). ๐ŸŽ€
  • 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. pppd by 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 the ipcp-no-address option, then pppd falls back to the old-style deprecated IP-Addresses IPCP option. When both new-style and old-style are disabled by both ipcp-no-address and ipcp-no-addresses, then negotiation of IP addresses is completely disabled. ๐Ÿ’…
  • ipcp-restart n โ€” sets the IPCP restart interval (retransmission timeout) to n seconds (default 3). ๐ŸŒธ
  • ipparam string โ€” provides an extra parameter to most of the notification scripts โ€” most notably the ip-up, ip-pre-up, ip-down, ipv6-up, ipv6-down, auth-up and auth-down scripts. If this option is given, the string supplied is given as the 6th parameter to those scripts. ๐Ÿฆ‹
  • ipv6cp-accept-local โ€” with this option, pppd will 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, pppd will 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 โ€” lets pppd operate 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 (default 10). โœจ
  • ipv6cp-max-failure n โ€” sets the max number of IPv6CP configure-NAKs returned before it starts sending configure-Rejects instead to n (default 10). ๐Ÿ”ฅ
  • ipv6cp-max-terminate n โ€” sets the max number of IPv6CP terminate-request transmissions to n (default 3). ๐ŸŽ€
  • ipv6cp-restart n โ€” sets the IPv6CP restart interval (retransmission timeout) to n seconds (default 3). ๐ŸŒธ
  • 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 of 1 will 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 messages
  • 2 โ€” request that the contents of received packets be printed
  • 4 โ€” 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 the ca and cert options. This option is privileged. ๐Ÿ”
  • ktune โ€” enables pppd to alter kernel settings as appropriate. Under Linux, pppd will enable IP forwarding (i.e. set /proc/sys/net/ipv4/ip_forward to 1) if the proxyarp option is used, and will enable the dynamic IP address option (i.e. set /proc/sys/net/ipv4/ip_dynaddr to 1) in demand mode if the local address changes. ๐Ÿ› ๏ธ
  • lcp-echo-adaptive โ€” if this option is used with the lcp-echo-failure option, then pppd will 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, pppd will presume the peer is dead if n LCP echo-requests are sent without receiving a valid LCP echo-reply. If that happens, pppd will 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, pppd will 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 the lcp-echo-failure option to detect that the peer is no longer connected. ๐ŸŒˆ
  • lcp-max-configure n โ€” sets the max number of LCP configure-request transmissions to n (default 10). โœจ
  • lcp-max-failure n โ€” sets the max number of LCP configure-NAKs returned before it starts sending configure-Rejects instead to n (default 10). ๐Ÿ”ฅ
  • lcp-max-terminate n โ€” sets the max number of LCP terminate-request transmissions to n (default 3). ๐ŸŽ€
  • lcp-restart n โ€” sets the LCP restart interval (retransmission timeout) to n seconds (default 3). ๐ŸŒธ
  • 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. pppd will create a file named ppp-name.pid in /var/run (or /etc/ppp on some systems) containing its process ID. This can be useful in determining which instance of pppd is 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, pppd will 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 the modem option. ๐Ÿ’…
  • 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 and logfile are mutually exclusive โ€” pick a lane bestie ๐Ÿ’…. Default is stdout (that's file descriptor 1), 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 system wtmp file. Lowkey important caveat: the peer needs an entry in /etc/ppp/pap-secrets as well as in the system password database to actually be allowed in. Also peep the enable-session option ๐Ÿ‘€.
  • 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 gave master_detach, pppd will detach from its controlling terminal in that situation โ€” even if nodetach was 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 of 0 means no limit. Default is 10 โ€” 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 is 1.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 as crtscts. This is the opposite of the local option ๐ŸŒธ.
  • mp โ€” enables PPP multilink; it's just an alias for the multilink option, 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 the multilink option) โœจ.
  • 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 (see multilink) ๐Ÿซถ.
  • 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 name dns-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 the user option, 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 by 0x. 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 of crtscts, nocrtscts, cdtrcts, or nocdtrcts is given, the hardware flow control setting for the serial port is left unchanged โ€” untouched, unbothered, living her life ๐ŸŒธ.
  • nocdtrcts โ€” synonym for nocrtscts. Either one disables both forms of hardware flow control ๐Ÿ‘‘
  • nodefaultroute โ€” disables the defaultroute option.
  • nodefaultroute6 โ€” disables the defaultroute6 option.
  • 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 the ktune option; disables pppd from changing system settings ๐Ÿ™ˆ.
  • nolock โ€” opposite of the lock option; 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 the logfd and logfile options. 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 the persist or demand option has been specified ๐Ÿ‘‹.
  • nopredictor1 โ€” do not accept or agree to Predictor-1 compression ๐Ÿšซ.
  • noproxyarp โ€” disables the proxyarp option. 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 the 10.x.x.x subnet. 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 off strict-script-checks. This option is privileged. โš ๏ธ
  • nostrict-secrets-files โ€” turns off strict-secrets-files. This option is privileged too. โš ๏ธ
  • notty โ€” okay so normally pppd needs a terminal device, it's kind of its whole thing. With this option it does NOT. Instead pppd allocates itself a pseudo-tty master/slave pair and uses the slave as its terminal device. Then it spawns a child process to act as a character shunt that transfers characters between the pseudo-tty master and its standard input and output. The way that works out is: pppd transmits 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, pppd will 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-secrets file which get used for checking the identity of the peer are encrypted, so pppd should not accept a password which โ€” before encryption โ€” is identical to the secret from /etc/ppp/pap-secrets. ๐Ÿ”
  • pap-max-authreq n โ€” sets the maximum number of PAP authenticate-request transmissions to n (default 10). โœจ
  • pap-restart n โ€” sets the PAP restart interval (that's the retransmission timeout, iykyk) to n seconds (default 3). โฑ๏ธ
  • pap-timeout n โ€” sets the maximum time pppd will wait for the peer to authenticate itself with PAP to n seconds. 0 means no limit, bestie โ€” no cap, no timer, no stress. ๐Ÿ’…
  • pass-filter filter-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 (like routed) 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). ๐Ÿง

  • password password-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 using ps(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. The maxfail option still has an effect on persistent connections, so keep that in mind. ๐Ÿ”ฅ
  • pkcs12 pkcs12file โ€” (EAP-TLS) read credentials for client-side EAP-TLS authentication from the file pkcs12file in PKCS12 format. This option is an alternative to the cert and key options. This option is privileged. ๐ŸŽ€
  • plugin filename โ€” load the shared library object file filename as a plugin. This is a privileged option. If filename doesn't contain a slash (/), pppd will look in the /usr/lib/pppd/version directory for the plugin, where version is the version number of pppd (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. ๐Ÿ™ƒ
  • privgroup group-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 use pppd to become root themselves. Consider it equivalent to putting the members of group-name in the kmem or disk group. ๐Ÿ˜ณ 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. ๐Ÿ‘‘
  • pty script โ€” specifies that the command script is to be used to communicate, rather than a specific terminal device. pppd will allocate itself a pseudo-tty master/slave pair and use the slave as its terminal device. The 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 the record option is used in conjunction with the pty option, 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, pppd will accept all control characters from the peer, including those marked in the receive asyncmap. Without this option, pppd will discard those characters as specified in RFC1662. This option should only be needed if the peer is buggy. ๐Ÿ’€ Yes, we're being nice to the buggy peer.
  • record filename โ€” specifies that pppd should 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 the pppdump(8) program. ๐Ÿ“ผโœจ
  • remotename name โ€” sets the assumed name of the remote system, for authentication purposes, to name. ๐Ÿท๏ธ
  • remotenumber number โ€” sets the assumed telephone number of the remote system, for authentication purposes, to number. โ˜Ž๏ธ
  • refuse-chap โ€” with this option, pppd will not agree to authenticate itself to the peer using CHAP. ๐Ÿ™…โ€โ™€๏ธ
  • refuse-mschap โ€” with this option, pppd will not agree to authenticate itself to the peer using MS-CHAP. ๐Ÿ™…โ€โ™€๏ธ
  • refuse-mschap-v2 โ€” with this option, pppd will not agree to authenticate itself to the peer using MS-CHAPv2. ๐Ÿ™…โ€โ™€๏ธ
  • refuse-eap โ€” with this option, pppd will not agree to authenticate itself to the peer using EAP. ๐Ÿ™…โ€โ™€๏ธ
  • refuse-pap โ€” with this option, pppd will 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 both 40-bit and 128-bit encryption. 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, with 40-bit encryption. ๐Ÿ“
  • require-mppe-128 โ€” requires the use of MPPE, with 128-bit encryption. ๐Ÿ”ฅ
  • 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. ๐ŸŽ€
  • set name=value โ€” sets an environment variable for scripts that are invoked by pppd. When set by a privileged source, the variable specified by name cannot be changed by options contained in an unprivileged source. See also the unset option and the environment described in SCRIPTS. ๐ŸŒˆ
  • show-password โ€” when logging the contents of PAP packets, this option causes pppd to show the password string in the log message. ๐Ÿซฃ Bestie. It's literally in the log. (See password above, same energy.)
  • silent โ€” with this option, pppd will not transmit LCP packets to initiate a connection until a valid LCP packet is received from the peer (as for the passive option with ancient versions of pppd). ๐Ÿคซ Waiting to be spoken to first, honestly relatable.
  • srp-interval n โ€” if this parameter is given and pppd uses EAP SRP-SHA1 to authenticate the peer (i.e., it is the server), then pppd will use the optional lightweight SRP rechallenge mechanism at intervals of n seconds. This option is faster than eap-interval reauthentication, because it uses a hash-based mechanism and does not derive a new session key. โšก Slay, efficiency.
  • srp-pn-secret string โ€” 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_pseudonym first 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 are 1 or 2, and the default is 1. 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 inverse nostrict-script-checks (to disable the checks) is. this switches from using execve() when invoking scripts to using execveat(), 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 the PPP_SCRIPT_INSTANCE environment 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 for remotename to 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, or suffix. the default value is none. 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 a ppp0 or ppp1 etc 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 VRF name instead 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 the set option 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 of Type=notify (up_sdnotify implies nodetach). when up_sdnotify is 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 the name option). this option is not normally needed since the name option is privileged. extra, but valid ๐Ÿ’œ
  • usepeerdns โ€” ask the peer for up to 2 DNS server addresses. the addresses supplied by the peer (if any) are passed to the /etc/ppp/ip-up script in the environment variables DNS1 and DNS2, and the environment variable USEPEERDNS will be set to 1. in addition, pppd will create an /etc/ppp/resolv.conf file containing one or two nameserver lines with the address(es) supplied by the peer (unless the noresolvconf option is given). slay ๐ŸŒˆ
  • usepeerwins โ€” ask the peer for up to 2 WINS server addresses. the addresses supplied by the peer (if any) are passed to the /etc/ppp/ip-up script in the environment variables WINS1 and WINS2, and the environment variable USEPEERWINS will be set to 1.
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.conf file. simple as that ๐ŸŽ€
  • user name โ€” sets the name used for authenticating the local system to the peer to name. 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 to n, which must be between 2 and 16 (inclusive). no zero, no seventeen, we stay in range ๐Ÿ‘‘
  • welcome script โ€” run the executable or shell command specified by script before initiating PPP negotiation, after the connect script (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 device interface to communicate with the peer. for example, establishing a PPPoE link on eth0 interface is done by specifying pppd's option nic-eth0. the prefix nic- 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 service name. for backward compatibility also rp_pppoe_service option name is supported.
  • pppoe-ac name โ€” connect to specified PPPoE access concentrator name. for backward compatibility also rp_pppoe_ac option name is supported.
  • pppoe-sess sessid:macaddr โ€” attach to existing PPPoE session. for backward compatibility also rp_pppoe_sess option name is supported.
  • pppoe-verbose n โ€” be verbose about discovered access concentrators. when set to 2 or bigger value then dump also discovery packets. for backward compatibility also rp_pppoe_verbose option 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 the pppoe- prefix ๐ŸŽ€
  • pppoe-padi-timeout n โ€” initial timeout for discovery packets in seconds (default 5).
  • pppoe-padi-attempts n โ€” number of discovery attempts (default 3). 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-secrets for PAP
  • /etc/ppp/chap-secrets for CHAP, MS-CHAP, MS-CHAPv2, and EAP MD5-Challenge
  • /etc/ppp/srp-secrets for 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 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 the CAP_NET_ADMIN capability. ๐Ÿ™ˆ
  • 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 a SIGINT, SIGTERM or SIGHUP signal.
  • 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 the pty option 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 set ip-up-script /some/other/path this variable will still be ip-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 the vrf option.
  • 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 the remotenumber option. the meaning of this varies based on the type of connection โ€” xl2tpd for example can either provide the dialing number AVP or the remote's IP address, and pppoe-server typically 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 the linkname option.
  • CALL_FILE โ€” the value of the call option.
  • DNS1 โ€” if the peer supplies DNS server addresses, this variable is set to the first DNS server address supplied (whether or not the usepeerdns option was given).
  • DNS2 โ€” if the peer supplies DNS server addresses, this variable is set to the second DNS server address supplied (whether or not the usepeerdns option 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 the pppoe plugin 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-up is NOT actually guaranteed to execute prior to the interface moving into an up state. although IP information won't be known, you should consider using net-pre-up instead โ€” alternatively, disable other NCPs such that IPv4 is the only negotiated protocol, which will also result in a guarantee that ip-pre-up is 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 the linkname option).
  • /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 the srp-use-pseudonym option 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 when pppd was 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 make pppd terminate 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, pppd will send the very same signal to its process group, so the connector or disconnector process gets terminated too. teamwork, kinda ๐Ÿ˜ญ
  • SIGHUP โ€” this one makes pppd terminate the link, restore the serial device settings, and close the serial device. now here's the plot twist: if the persist or demand option has been specified, pppd will try to reopen the serial device and start another connection (after the holdoff period). otherwise? pppd exits, periodt. and if this signal lands during the holdoff period, it makes pppd end the holdoff period immediately. also, if a connector or disconnector process is running, pppd will send the same signal to its process group.
  • SIGUSR1 โ€” toggles the state of the debug option. on. off. on. off. she's a light switch ๐Ÿ’…
  • SIGUSR2 โ€” makes pppd renegotiate 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 ๐ŸŒŸ


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
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms