LinuxCommandLibrary

pppd

Establish PPP (Point-to-Point Protocol) connections

TLDR

Start the daemon

$ pppd
copy

SYNOPSIS

pppd [tty_name] [speed] [local_IP:remote_IP] [options]
pppd call profile_name [options]

PARAMETERS

debug
    Enables debugging mode, logging detailed information to system logs (syslog) or standard error.

nodetach
    Prevents pppd from detaching from the controlling terminal, useful for debugging.

noauth
    Disables peer authentication. The remote end is not required to authenticate itself.

user name
    Sets the username to be used for authenticating with the peer.

password secret
    Sets the password to be used for authenticating with the peer. (Note: Using this option directly is insecure; prefer secret files).

ipcp-accept-remote
    Allows pppd to accept the remote IP address proposed by the peer during IPCP negotiation.

ipcp-accept-local
    Allows pppd to accept the local IP address proposed by the peer during IPCP negotiation.

defaultroute
    Adds a default route to the routing table through the PPP link upon connection establishment.

persist
    Instructs pppd to re-establish the connection if it is terminated unexpectedly.

connect script
    Specifies a shell script or command to execute to establish the physical link (e.g., dial a modem).

disconnect script
    Specifies a shell script or command to execute to terminate the physical link.

lock
    Uses UUCP-style lock files to ensure exclusive access to the serial device.

crtscts
    Enables hardware flow control (RTS/CTS) on the serial port.

modem
    Uses modem control lines (DTR, RTS, DCD, RI) for controlling the serial port.

call name
    Loads configuration options from a named file in /etc/ppp/peers/name.

DESCRIPTION

pppd (Point-to-Point Protocol daemon) is a widely used Linux daemon that implements the Point-to-Point Protocol (PPP). PPP is a data link layer protocol primarily used for establishing a direct connection between two networking nodes. Historically, pppd was crucial for dial-up internet access, allowing computers to connect to ISPs via modems.

Beyond modems, pppd supports various serial communication links, including ISDN, ADSL, and virtual private network (VPN) tunnels. It handles the negotiation of link control protocol (LCP) parameters, such as authentication (PAP and CHAP), data compression, and error correction.

Once the link is established, pppd proceeds with the network control protocol (NCP), typically IPCP (Internet Protocol Control Protocol), to negotiate IP addresses, DNS server addresses, and routing information. It can assign dynamic IP addresses to the local or remote end, add default routes, and manage network interfaces. Its flexibility and robustness have made it a cornerstone for many network configurations, even as direct Ethernet connections have become more common for broadband services.

CAVEATS

pppd requires root privileges to configure network interfaces and manage system routes. Misconfiguration, especially concerning authentication (using PAP over unencrypted links) or allowing `noauth`, can pose significant security risks. It's crucial to protect secret files (/etc/ppp/chap-secrets, /etc/ppp/pap-secrets) with strict permissions. While still relevant for some specialized applications and VPNs, its direct usage for general internet access has largely been superseded by more modern broadband technologies.

CONFIGURATION FILES

pppd relies heavily on a flexible configuration file system.

  • /etc/ppp/options: Global default options for all PPP connections.
  • /etc/ppp/peers/name: Specific options for named connections invoked with 'pppd call name'.
  • /etc/ppp/chap-secrets: Stores usernames and passwords for CHAP authentication.
  • /etc/ppp/pap-secrets: Stores usernames and passwords for PAP authentication.

It's critical to set strict permissions (e.g., 600) on secret files to prevent unauthorized access.

PLUGINS

pppd supports dynamic plugins to extend its functionality, allowing for custom authentication methods, connection management, or integration with external systems. This modularity enhances its adaptability to various network environments.

HISTORY

The development of PPP, and subsequently pppd, began in the early 1990s as a successor to SLIP (Serial Line Internet Protocol) to provide a standard method for encapsulating network layer protocols over a serial link. PPP's robustness, multi-protocol support, and built-in authentication mechanisms (PAP, CHAP) quickly made it the standard for dial-up internet access. pppd became the primary Linux implementation of this protocol, crucial for bringing internet connectivity to early Linux users via modems.

Over time, its usage expanded beyond traditional modems to ISDN, ADSL (via PPPoE), and establishing VPN tunnels. While direct dial-up usage has declined significantly, pppd remains a vital component in various embedded systems, specialized networking appliances, and for certain types of VPNs where its flexibility and maturity are still highly valued.

SEE ALSO

chat(8), pon(8), poff(8), pppoe(8), ifconfig(8), ip(8), route(8)

Copied to clipboard