第 16 章. 如果你的 PPP 服务器使用 PAP (密码验证协议)

目录
16.1. 使用 MSCHAP
16.2. PAP/CHAP 密钥文件
16.3. PAP 密钥文件
16.4. CHAP 密钥文件
16.5. 处理多个 PAP 认证的连接

如果你的服务器需要 PAP 或 CHAP 认证,你需要做更多的工作。

在上述选项文件中,添加以下行
#
# force pppd to use your ISP user name as your 'host name' during the
# authentication process
name <your ISP user name>	# you need to edit this line
#
# If you are running a PPP *server* and need to force PAP or CHAP
# uncomment the appropriate one of the following lines. Do NOT use 
# these is you are a client connecting to a PPP server (even if it uses PAP
# or CHAP) as this tells the SERVER to authenticate itself to your
# machine (which almost certainly can't do - and the link will fail).
#+chap
#+pap
#
# If you are using ENCRYPTED secrets in the /etc/ppp/pap-secrets
# file, then uncomment the following line.
# Note: this is NOT the same as using MS encrypted passwords as can be
# set up in MS RAS on Windows NT.
#+papcrypt

16.1. 使用 MSCHAP

Microsoft Windows NT RAS 可以设置为使用 CHAP (挑战/握手认证协议) 的变体。在你的 PPP 源代码 tar 包中,你会找到一个名为 README.MSCHAP80 的文件,其中讨论了这一点。

你可以通过为 pppd 启用调试来确定服务器是否正在使用此协议请求认证。如果服务器正在请求 MS CHAP 认证,你将看到如下行:-

rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap 80> <magic 0x46a3>]

这里的关键信息是 auth chap 80

为了使用 MS CHAP,你需要重新编译 pppd 以支持它。请参阅 PPP 源代码文件中的 README.MSCHAP80 文件中的说明,以了解如何编译和使用此变体。

你应该注意,目前此代码仅支持 Linux PPP 客户端连接到 MS Windows NT 服务器。它 支持设置 Linux PPP 服务器以从客户端使用 MSCHAP80 认证。