192.168.1.1 (我的静态 IP 地址找个,你设的什么就是什么,不用抄我的。但是如果你的Local中有机器用了找个地址,那就不能用来这里了。) [email protected](你的帐户) * xxxxxxx(你的密码) 记住中间的 * 可不要给删除了。 pap-secrets 中的设置跟上面完全相同。我就省略了。 ---------------------------------------------------------------------------------- (2)options 找个文件的设置非常重要。以下是全文,还有一小部分都是注解,我就不写上来了。 # /etc/ppp/options # # Not every option is listed here, see man pppd for more details. # This file is read by the pppd, # it is an error when it is not present. # # use the following command to see the active options: # # grep -v ^# /etc/ppp/options grep -v ^$ # # ------ # The name of this server. Often, the FQDN is used here. #name #=================================================================== user [email protected] ( 注意前面的user,不要漏掉了,后门接着的就是你前面用的那个。) #=================================================================== # Enforce the use of the hostname as the name of the local system for # authentication purposes (overrides the name option). #usehostname # If no local IP address is given, pppd will use the first IP address # that belongs to the local hostname. If "noipdefault" is given, this # is disabled and the peer will have to supply an IP address. #noipdefault # 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-local # 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-accept-remote # Run the executable or shell command specified after pppd has terminated # the link. This script could, for example, issue commands to the modem # to cause it to hang up if hardware modem control signals were not # available. # If mgetty is running, it will reset the modem anyway. So there is no need # to do it here. #disconnect "chat -- \d+++\d\c OK ath0 OK" # Increase debugging level (same as -d). The debug output is written # to syslog LOG_LOCAL2. debug # Enable debugging code in the kernel-level PPP driver. The argument n # is a number which is the sum of the following values: 1 to enable # general debug messages, 2 to request that the contents of received # packets be printed, and 4 to request that the contents of transmitted # packets be printed. #kdebug n # noauth means do not require the peer to authenticate itself, this must # be set if you want to use pppd to connect to the internet. In this case # *you* must authenicate yourself to the peer(internet provider), so do # not disable this setting unless you are the dial-in server which where # the peer has to autenticate to. noauth # Use hardware flow control (i.e. RTS/CTS) to control the flow of data # on the serial port. crtscts # Specifies that pppd should use a UUCP-style lock on the serial device # to ensure exclusive access to the device. lock # Use the modem control lines.(is default) #modem (将它注释掉,系统默认是打开的) # The opposite: local # # Description: # Don't use the modem control lines. With this # option, pppd will ignore the state of the CD (Car?? # rier Detect) signal from the modem and will not # change the state of the DTR (Data Terminal Ready) # signal. # # You need to disable modem and enable local if you want to connect # to anoter system without using a modem: local (加上这个) # async character map -- 32-bit hex; each bit is a character # that needs to be escaped for pppd to receive it. 0x00000001 # represents '\x01', and 0x80000000 represents '\x1f'. # To allow pppd to work over a rlogin/telnet connection, ou should escape # XON (^Q), XOFF (^S) and ^]: (The peer should use "escape ff".) #asyncmap 200a0000 asyncmap 0 # needed for some ISDN Terminaladaters, namely ELSA, those seem to have # problems with asyncmap negotiation, so you can turn off this procedure # in case your ISDN box has trouble with it, by enabling this option. # You have to disable the asyncmap option to be sure to have it # active. If you use wvdial, set the ISDN parameter in /etc/wvdial.conf # instead. #default-asyncmap # Set the MRU [Maximum Receive Unit] value to for negotiation. pppd # will ask the peer to send packets of no more than bytes. The # minimum MRU value is 128. The default MRU value is 1500. A value of # 296 is recommended for slow links (40 bytes for TCP/IP header + 256 # bytes of data). The value 1492 is for DSL connections (PPP Default - # PPPoE Header: 1500 - 8 = 1492) mru 1492 (要加上找个) # Set the MTU [Maximum Transmit Unit] value to . 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. The value 1492 is for DSL connections # (PPP Default - PPPoE Header: 1500 - 8 = 1492) mtu 1492 (找个也要加上) # Set the interface netmask to , a 32 bit netmask in "decimal dot" # notation (e.g. 255.255.255.0). #netmask 255.255.255.0 # Don't fork to become a background process (otherwise pppd will do so # if a serial device is specified). nodetach # If this option is given, pppd will send an LCP echo-request frame to # the peer every n seconds. Under Linux, the echo-request is sent when # no packets have been received from the peer for 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-echo-interval 30
[1] [2] 下一页
(出处:http://www.sheup.com)