📄 pppd.8
字号:
.IPABORT "NO CARRIER".brABORT "NO DIALTONE".brABORT "ERROR".brABORT "NO ANSWER".brABORT "BUSY".brABORT "Username/Password Incorrect".br"" "at".brOK "at&d0&c1".brOK "atdt2468135".br"name:" "^Umyuserid".br"word:" "\\qmypassword".br"ispts" "\\q^Uppp".br"~-^Uppp-~".LPSee the chat(8) man page for details of chat scripts..LPPppd can also be used to provide a dial-in ppp service for users. Ifthe users already have login accounts, the simplest way to set up theppp service is to let the users log in to their accounts and run pppd(installed setuid-root) with a command such as.IPpppd proxyarp.LPTo allow a user to use the PPP facilities, you need to allocate an IPaddress for that user's machine and create an entry in/etc/ppp/pap-secrets or /etc/ppp/chap-secrets (depending on whichauthentication method the PPP implementation on the user's machinesupports), so that the user'smachine can authenticate itself. For example, if Joe has a machinecalled "joespc" which is to be allowed to dial in to the machinecalled "server" and use the IP address joespc.my.net, you would add anentry like this to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets:.IPjoespc server "joe's secret" joespc.my.net.LPAlternatively, 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..LPIf your serial connection is any more complicated than a piece ofwire, you may need to arrange for some control characters to beescaped. In particular, it is often useful to escape XON (^Q) andXOFF (^S), using \fIasyncmap a0000\fR. If the path includes a telnet,you probably should escape ^] as well (\fIasyncmap 200a0000\fR). Ifthe path includes an rlogin, you will need to use the \fIescape ff\fRoption on the end which is running the rlogin client, since manyrlogin implementations are not transparent; they will remove thesequence [0xff, 0xff, 0x73, 0x73, followed by any 8 bytes] from thestream..SH DIAGNOSTICS.LPMessages are sent to the syslog daemon using facility LOG_DAEMON.(This can be overriden by recompiling pppd with the macroLOG_PPP defined as the desired facility.) In order to see the errorand debug messages, you will need to edit your /etc/syslog.conf fileto direct the messages to the desired output device or file..LPThe \fIdebug\fR option causes the contents of all control packets sentor received to be logged, that is, all LCP, PAP, CHAP or IPCP packets.This can be useful if the PPP negotiation does not succeed or ifauthentication fails.If debugging is enabled at compile time, the \fIdebug\fR option alsocauses other debugging messages to be logged..LPDebugging can also be enabled or disabled by sending a SIGUSR1 signalto the pppd process. This signal acts as a toggle..SH EXIT STATUSThe exit status of pppd is set to indicate whether any error wasdetected, or the reason for the link being terminated. The valuesused are:.TP.B 0Pppd has detached, or otherwise the connection was successfullyestablished and terminated at the peer's request..TP.B 1An immediately fatal error of some kind occurred, such as an essentialsystem call failing, or running out of virtual memory..TP.B 2An error was detected in processing the options given, such as twomutually exclusive options being used..TP.B 3Pppd is not setuid-root and the invoking user is not root..TP.B 4The kernel does not support PPP, for example, the PPP kernel driver isnot included or cannot be loaded..TP.B 5Pppd terminated because it was sent a SIGINT, SIGTERM or SIGHUPsignal..TP.B 6The serial port could not be locked..TP.B 7The serial port could not be opened..TP.B 8The connect script failed (returned a non-zero exit status)..TP.B 9The command specified as the argument to the \fIpty\fR option couldnot be run..TP.B 10The PPP negotiation failed, that is, it didn't reach the point whereat least one network protocol (e.g. IP) was running..TP.B 11The peer system failed (or refused) to authenticate itself..TP.B 12The link was established successfully and terminated because it wasidle..TP.B 13The link was established successfully and terminated because theconnect time limit was reached..TP.B 14Callback was negotiated and an incoming call should arrive shortly..TP.B 15The link was terminated because the peer is not responding to echorequests..TP.B 16The link was terminated by the modem hanging up..TP.B 17The PPP negotiation failed because serial loopback was detected..TP.B 18The init script failed (returned a non-zero exit status)..TP.B 19We failed to authenticate ourselves to the peer..SH SCRIPTSPppd invokes scripts at various stages in its processing which can beused to perform site-specific ancillary processing. These scripts areusually shell scripts, but could be executable code files instead.Pppd does not wait for the scripts to finish. The scripts areexecuted as root (with the real and effective user-id set to 0), sothat they can do things such as update routing tables or runprivileged daemons. Be careful that the contents of these scripts donot compromise your system's security. Pppd runs the scripts withstandard input, output and error redirected to /dev/null, and with anenvironment that is empty except for some environment variables thatgive information about the link. The environment variables that pppdsets are:.TP.B DEVICEThe name of the serial tty device being used..TP.B IFNAMEThe name of the network interface being used..TP.B IPLOCALThe IP address for the local end of the link. This is only set whenIPCP has come up..TP.B IPREMOTEThe IP address for the remote end of the link. This is only set whenIPCP has come up..TP.B PEERNAMEThe authenticated name of the peer. This is only set if the peerauthenticates itself..TP.B SPEEDThe baud rate of the tty device..TP.B ORIG_UIDThe real user-id of the user who invoked pppd..TP.B PPPLOGNAMEThe username of the real user-id that invoked pppd. This is always set..PFor the ip-down and auth-down scripts, pppd also sets the followingvariables giving statistics for the connection:.TP.B CONNECT_TIMEThe number of seconds from when the PPP negotiation started until theconnection was terminated..TP.B BYTES_SENTThe number of bytes sent (at the level of the serial port) during theconnection..TP.B BYTES_RCVDThe number of bytes received (at the level of the serial port) duringthe connection..TP.B LINKNAMEThe logical name of the link, set with the \fIlinkname\fR option..PPppd invokes the following scripts, if they exist. It is not an errorif they don't exist..TP.B /etc/ppp/auth-upA program or script which is executed after the remote systemsuccessfully authenticates itself. It is executed with the parameters.IP\fIinterface-name peer-name user-name tty-device speed\fR.IPNote that this script is not executed if the peer doesn't authenticateitself, for example when the \fInoauth\fR option is used..TP.B /etc/ppp/auth-downA program or script which is executed when the link goes down, if/etc/ppp/auth-up was previously executed. It is executed in the samemanner with the same parameters as /etc/ppp/auth-up..TP.B /etc/ppp/ip-upA program or script which is executed when the link is available forsending and receiving IP packets (that is, IPCP has come up). It isexecuted with the parameters.IP\fIinterface-name tty-device speed local-IP-addressremote-IP-address ipparam\fR.TP.B /etc/ppp/ip-downA program or script which is executed when the link is no longeravailable for sending and receiving IP packets. This script can beused for undoing the effects of the /etc/ppp/ip-up script. It isinvoked in the same manner and with the same parameters as the ip-upscript..TP.B /etc/ppp/ipv6-upLike /etc/ppp/ip-up, except that it is executed when the link is available for sending and receiving IPv6 packets. It is executed with the parameters.IP\fIinterface-name tty-device speed local-link-local-addressremote-link-local-address ipparam\fR.TP.B /etc/ppp/ipv6-downSimilar to /etc/ppp/ip-down, but it is executed when IPv6 packets can nolonger be transmitted on the link. It is executed with the same parameters as the ipv6-up script..TP.B /etc/ppp/ipx-upA program or script which is executed when the link is available forsending and receiving IPX packets (that is, IPXCP has come up). It isexecuted with the parameters.IP\fIinterface-name tty-device speed network-number local-IPX-node-addressremote-IPX-node-address local-IPX-routing-protocol remote-IPX-routing-protocollocal-IPX-router-name remote-IPX-router-name ipparam pppd-pid\fR .IPThe local-IPX-routing-protocol and remote-IPX-routing-protocol fieldmay be one of the following:.IPNONE to indicate that there is no routing protocol.brRIP to indicate that RIP/SAP should be used.brNLSP to indicate that Novell NLSP should be used.brRIP NLSP to indicate that both RIP/SAP and NLSP should be used.TP.B /etc/ppp/ipx-downA program or script which is executed when the link is no longeravailable for sending and receiving IPX packets. This script can beused for undoing the effects of the /etc/ppp/ipx-up script. It isinvoked in the same manner and with the same parameters as the ipx-upscript..SH FILES.TP.B /var/run/ppp\fIn\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp\fIn\fB.pid \fR(others)Process-ID for pppd process on ppp interface unit \fIn\fR..TP.B /var/run/ppp-\fIname\fB.pid \fR(BSD or Linux), \fB/etc/ppp/ppp-\fIname\fB.pid \fR(others)Process-ID for pppd process for logical link \fIname\fR (see the\fIlinkname\fR option)..TP.B /etc/ppp/pap-secretsUsernames, passwords and IP addresses for PAP authentication. Thisfile should be owned by root and not readable or writable by any otheruser. Pppd will log a warning if this is not the case..TP.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -