mac使⽤pptp的正确⽅式
环境:macos mojave 10.14.6
尝试的解决⽅案:
1. mac⾃带vpn 结论:已经不⽀持pptp协议唯独的反义词
2. 使⽤shimo 结论:⽆⽤,连接的时候没反应
3. 为了解决不能连接的问题,某⽼外写的pptp连接⼯具 结论:⽆⽤,报错信息和下⼀步脚本执⾏结果⼀样
4. 实⽤pppd,步骤如下:
1)进⼊ /etc/ppp/peers/ ⽬录,创建 test.vpn,此⽂件名⾃⼰取;
2)写⼊以下内容,根据需要修改;
plugin PPTP.ppp
noauth
remoteaddress "------VPN rver name or IP address------"
ur "------VPN urname------"
password "------VPN password------"
redialcount 1
redialtimer 5
idle 1800最赚钱的职业
# mru 1368
# mtu 1368
receive-all
novj 0:0
ipcp-accept-local
ipcp-accept-remote
refu-eap
refu-pap
refu-chap-md5
hide-password
mppe-stateless
mppe-128
# require-mppe-128
looplocal
nodetach
爬山虎的脚pptms-dns 8.8.8.8
upeerdns
# ipparam gwvpn
defaultroute
debug
3)运⾏sudo pppd call test.vpn
结论:出错,结果如下:
Sat Feb 29 11:24:47 2020 : publish_entry SCDSet() failed: Success!
Sat Feb 29 11:24:47 2020 : publish_entry SCDSet() failed: Success!
Sat Feb 29 11:24:47 2020 : PPTP connecting to rver ‘x’ (x)…
Sat Feb 29 11:24:48 2020 : PPTP connection established.
Sat Feb 29 11:24:48 2020 : PPTP t port-mapping for en0, interface: 9, protocol: 0, privatePort: 0 Sat Feb 29 11:24:48 2020 : using link 0
Sat Feb 29 11:24:48 2020 : Using interface ppp0
Sat Feb 29 11:24:48 2020 : Connect: ppp0 <–> socket[34:17]
Sat Feb 29 11:24:48 2020 : nt [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x60725c7f> ] Sat Feb 29 11:24:51 2020 : rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90775e6> ] Sat Feb 29 11:24:51 2020 : lcp_reqci: returning CONFACK.
Sat Feb 29 11:24:51 2020 : nt [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x90775e6> ]
Sat Feb 29 11:24:51 2020 : nt [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x90775e6> ]
Sat Feb 29 11:24:51 2020 : nt [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x60725c7f> ]
Sat Feb 29 11:24:51 2020 : rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x60725c7f> ]
Sat Feb 29 11:24:51 2020 : rcvd [CHAP Challenge id=0xf9 <4a44a223bded3c174d9524e514b7b186>, name =“pptpd”]
Sat Feb 29 11:24:51 2020 : nt [CHAP Respon id=0xf9
<7fa23ba608c73e19030ab3ac356541de00000000000044442b41d5fa9f4034e4ba1cf873502c4e3e4ca4d8675 2c1994800>, name = “xx”]
Sat Feb 29 11:24:51 2020 : rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x241bc6d7> ]
Sat Feb 29 11:24:51 2020 : nt [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x330e8a78> ]
Sat Feb 29 11:24:51 2020 : lcp_reqci: returning CONFACK.
Sat Feb 29 11:24:51 2020 : nt [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0x241bc6d7> ]
Sat Feb 29 11:24:51 2020 : rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x60725c7f> ]
Sat Feb 29 11:24:51 2020 : rcvd [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0x330e8a78> ]
Sat Feb 29 11:24:51 2020 : rcvd [CHAP Challenge id=0xf1 <7152e60444448f03c00d77bc4f4f85e7>, name =“pptpd”]
Sat Feb 29 11:24:51 2020 : nt [CHAP Respon id=0xf1
<67c6ba6d36b2fcf0f07d2b24d38a13db000000000000000099b744446dee24113587aab45c859bc033099f424
d94e50400>, name = “xx”]
Sat Feb 29 11:24:51 2020 : rcvd [CHAP Success id=0xf1
“S=21E481AFF77DB980039418F738D7749C6A4C590A M=Access granted”]
Sat Feb 29 11:24:51 2020 : nt [CCP ConfReq id=0x1 <mppe +H -M +S -L -D -C>]
什么字全世界通用Sat Feb 29 11:24:51 2020 : rcvd [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15>]
Sat Feb 29 11:24:51 2020 : MPPE required but peer negotiation failed
Sat Feb 29 11:24:51 2020 : nt [LCP TermReq id=0x3 “MPPE required but peer negotiation failed”]国民党失败的原因
Sat Feb 29 11:24:51 2020 : Connection terminated.
Sat Feb 29 11:24:51 2020 : nt [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15>]
谈恋爱怎么谈Sat Feb 29 11:24:51 2020 : PPTP disconnecting…
Sat Feb 29 11:24:51 2020 : PPTP clearing port-mapping for en0
Sat Feb 29 11:24:51 2020 : PPTP disconnected
刺梨怎么吃
可以发现,报错信息在这⾥:
MPPE required but peer negotiation failed
多⽅搜索⽆果,只能靠⾃⼰了…
再次打开 test.vpn 配置⽂件,我发现了其中关于 mmpe 的部分:
mppe-stateless
mppe-128
# require-mppe-128躺平作文
发现问题所在了吗?我搜索到的所有教我配置pppd配置⽂件中的内容都是这样,但是报错却提⽰“MPPE required but peer negotiation failed”,因此,我尝试将另外两⾏和mmpe相关的配置⾏注释掉,结果如下:
# mppe-stateless
# mppe-128
# require-mppe-128
再次执⾏ sudo pppd call test.vpn,错误解决,运⾏成功!!
如图,运⾏成功后,最下⾯两⾏是这样: