OSX PPTP VPN 服务器上的 MPPE 困难

OSX PPTP VPN 服务器上的 MPPE 困难

我正在尝试在 Mac OSX 服务器上重新启动并运行 VPN,但似乎遇到了 MPPE 问题。当我尝试从同一本地网络上的笔记本电脑连接到 VPN 时,我收到以下消息/var/log/ppp/vpnd.log

2015-07-14 17:01:45 MDT Incoming call... Address given to client = xx.xxx.xx.xxx
Tue Jul 14 17:01:45 2015 : Directory Services Authentication plugin initialized
Tue Jul 14 17:01:45 2015 : Directory Services Authorization plugin initialized
Tue Jul 14 17:01:45 2015 : PPTP incoming call in progress from '192.168.1.154'...
Tue Jul 14 17:01:46 2015 : PPTP connection established.
Tue Jul 14 17:01:46 2015 : using link 0
Tue Jul 14 17:01:46 2015 : Using interface ppp0
Tue Jul 14 17:01:46 2015 : Connect: ppp0 <--> socket[34:17]
Tue Jul 14 17:01:46 2015 : sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x4c905d23> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5dd17fa9> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : lcp_reqci: returning CONFACK.
Tue Jul 14 17:01:46 2015 : sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x5dd17fa9> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x4c905d23> <pcomp> <accomp>]
Tue Jul 14 17:01:46 2015 : sent [LCP EchoReq id=0x0 magic=0x4c905d23]
Tue Jul 14 17:01:46 2015 : sent [CHAP Challenge id=0x43 <2a596a4a75602b4946642a2d1b12050b>, name = "server"]
Tue Jul 14 17:01:46 2015 : rcvd [LCP EchoRep id=0x0 magic=0x5dd17fa9]
Tue Jul 14 17:01:46 2015 : rcvd [CHAP Response id=0x43 <afb93f9351af212c460cf851eaf6d0580000000000000000e1bda0d312f0542755399c6ca465b7a8878439608d30f16100>, name = "admin"]
Tue Jul 14 17:01:46 2015 : sent [CHAP Success id=0x43 "S=3B614827970F82512A68E1022EF6F7FC0AF4FA3F M=Access granted"]
Tue Jul 14 17:01:46 2015 : CHAP peer authentication succeeded for admin
Tue Jul 14 17:01:46 2015 : DSAccessControl plugin: User 'admin' authorized for access
Tue Jul 14 17:01:46 2015 : sent [CCP ConfReq id=0x1 <mppe +H -M +S +L -D -C>]
Tue Jul 14 17:01:46 2015 : rcvd [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Tue Jul 14 17:01:46 2015 : MPPE required but peer negotiation failed
Tue Jul 14 17:01:46 2015 : sent [LCP TermReq id=0x2 "MPPE required but peer negotiation failed"]
Tue Jul 14 17:01:46 2015 : Connection terminated.
Tue Jul 14 17:01:46 2015 : sent [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Tue Jul 14 17:01:46 2015 : Connect time 0.0 minutes.
Tue Jul 14 17:01:46 2015 : Sent 0 bytes, received 0 bytes.
Tue Jul 14 17:01:46 2015 : PPTP disconnecting...
Tue Jul 14 17:01:46 2015 : PPTP disconnected
2015-07-14 17:01:46 MDT    --> Client with address = xx.xxx.xx.xxx has hungup

我在网上搜索到的信息(特别是这里) 是客户端和服务器之间存在加密不匹配。我无法在服务器上启动图形环境,因此我一直通过 ssh 进行配置。服务器上适用的文件似乎是/Library/Preferences/SystemConfiguration/com.apple.RemoteAccessServers.plist,其中包含与 MPPE 相关的以下几行

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>ActiveServers</key>
        <array>
                <string>com.apple.ppp.pptp</string>
        </array>
        <key>Servers</key>
                ...
                <key>com.apple.ppp.pptp</key>
                <dict>
                        ...
                        <key>PPP</key>
                        <dict>
                                ...
                                <key>CCPProtocols</key>
                                <array>
                                        <string>MPPE</string>
                                </array>
                                ...
                                <key>MPPEKeySize128</key>
                                <integer>1</integer>
                                <key>MPPEKeySize40</key>
                                <integer>1</integer>
                                ...
                        </dict>
                        ...
                </dict>
        </dict>
</dict>
</plist>

这似乎应该配置为同时适用于 40 位和 128 位 MPPE 密钥大小。在我的服务器上,没有 中的文件/etc/ppp/。在客户端上,我有 中的文件/etc/ppp/,但与 MPPE 相关的所有内容似乎都被注释掉了/etc/ppp/options.pptp

# Encryption
# (There have been multiple versions of PPP with encryption support,
# choose with of the following sections you will use.  Note that MPPE
# requires the use of MSCHAP-V2 during authentication)

# http://ppp.samba.org/ the PPP project version of PPP by Paul Mackarras
# ppp-2.4.2 or later with MPPE only, kernel module ppp_mppe.o
# {{{
# Require MPPE 128-bit encryption
#require-mppe-128
# }}}

# http://polbox.com/h/hs001/ fork from PPP project by Jan Dubiec
# ppp-2.4.2 or later with MPPE and MPPC, kernel module ppp_mppe_mppc.o
# {{{
# Require MPPE 128-bit encryption
#mppe required,stateless
# }}}

我尝试取消注释各个 mppe 行(即使带有和不带有三个花括号,我也无法辨别它们是否有任何意义)。MPPE required but peer negotiation failed每次启动 VPN 连接时都会收到相同的消息。

我在客户端上运行 pppd 版本 2.4.5。在服务器上,尝试使用 pppd 运行任何选项都会出现以下消息

pppd: Can't open options file /etc/ppp/options: No such file or directory

所以我不确定服务器上运行的是哪个版本。

还有什么想法我应该尝试吗?

答案1

好吧,现在我觉得自己很蠢。事实证明,MPPE 确实在服务器上启用了。但我还没有在客户端上启用 MPPE!

我在客户端上运行的是 Linux Mint 17 XFCE,因此为了启用 MPPE,我单击了系统托盘中的网络指示器插件,并在“VPN 连接”下选择了“配置 VPN...”。从那里,我选择了要配置的 VPN,然后单击了“编辑...”。在“VPN”选项卡下,我单击了“高级...”按钮。在“安全和压缩”下有一个标记为“使用点对点加密 (MPPE)”的复选框。选中该复选框并单击“确定”和“保存”后,我就可以毫无问题地连接到 VPN。

相关内容