pptp - ‘管理关闭’。错误代码为 0,原因代码为 0

pptp - ‘管理关闭’。错误代码为 0,原因代码为 0

我需要在我的 ubuntu 16.10 上通过 pptp 进行连接,我有这个配置(完美适配我的 raspberry)

/etc/ppp/peers/myconn

pty "pptp pptpvpn.ams01.softlayer.com --nolaunchpppd --debug"
name xxxx
password xxxx
remotename PPTP
require-mppe-128
require-mschap-v2
refuse-eap
refuse-pap
refuse-chap
refuse-mschap
noauth
debug
persist
maxfail 0

/etc/ppp/ip-up.d/myconn (755)

#!/bin/sh
[ "$IFACE" != "ppp0" ] || exit 0
sudo /sbin/route add -net 10.104.236.0 netmask 255.255.255.0 dev ppp0

启动后pon myconn出现此错误:

pppd[6841]: pppd 2.4.7 started by ubuntu, uid 0
pppd[6841]: using channel 53901
pppd[6841]: Using interface ppp0
pppd[6841]: Connect: ppp0 <--> /dev/pts/2
pptp[6843]: anon log[main:pptp.c:350]: The synchronous pptp option is NOT activated
pptp[6868]: anon log[ctrlp_rep:pptp_ctrl.c:259]: Sent control packet type is 1 'Start-Control-Connection-Request'
pptp[6868]: anon log[ctrlp_disp:pptp_ctrl.c:781]: Received Start Control Connection Reply
pptp[6868]: anon log[ctrlp_disp:pptp_ctrl.c:815]: Client connection established.
pppd[6841]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xc44e461e> <pcomp> <accomp>]
pptp[6868]: anon log[ctrlp_rep:pptp_ctrl.c:259]: Sent control packet type is 7 'Outgoing-Call-Request'
pptp[6868]: anon log[ctrlp_disp:pptp_ctrl.c:900]: Received Outgoing Call Reply.
pptp[6868]: anon log[ctrlp_disp:pptp_ctrl.c:939]: Outgoing call established (call ID 44491, peer's call ID 59622).
pppd[6841]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xc44e461e> <pcomp> <accomp>]
pppd[6841]: message repeated 5 times: [ sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xc44e461e> <pcomp> <accomp>]]
pptp[6868]: anon log[ctrlp_disp:pptp_ctrl.c:975]: Call disconnect notification received (call id 59622)
pptp[6868]: anon log[ctrlp_error:pptp_ctrl.c:207]: Result code is 3 'Administrative Shutdown'. Error code is 0, Cause code is 0
pptp[6868]: anon log[call_callback:pptp_callmgr.c:84]: Closing connection (call state)
pppd[6841]: Script pptp pptpvpn.ams01.softlayer.com --nolaunchpppd --debug finished (pid 6842), status = 0x0
pppd[6841]: Modem hangup
pppd[6841]: Connection terminated.

这个 Linux 处于 NAT 下,ufw 被禁用,iptables 接受所有方向的所有...有人能帮我吗?我不知道

答案1

这不是配置级问题。可能您已正确配置了 PPPD,因为该配置可以在没有 NAT 的另一台设备上正常工作。

你根本不应该使用 PPTP,因为它已经过时由于一些安全问题。你确实应该使用一些安全的替代方案,例如OpenVPN. 如果您仍想使用 PPTP...

你遇到的问题很可能是你没有PPTP 直通在你的 NAT 上:

PPTP 使用端口上的 TCP 通道1723进行控制,并使用 GRE 协议封装数据并创建 VPN 隧道。问题实际上不是 PTPP 本身,而是 GRE;GRE 不使用端口。由于 NAT 的要求是连接必须使用 IP 地址和端口号,因此它不适用于 GRE。这就是 PTPP 直通地址。

对于 PPTP 你需要在防火墙上进行以下打开:

  • IP 协议= TCP,TCP 端口号= 1723 (由 PPTP 控制路径使用)
  • IP 协议 = GRE(值47)(由 PPTP 数据路径使用)

对于 GRE,您需要一个支持以下功能的路由器:增强型 GRE 报头直通。在路由器配置中,这可能是名为点对点隧道协议或者IPsec 直通


3 'Administrative Shutdown'只是来自 PPTP 客户端的正常结果代码pptp_ctrl.c (PPTP 控制连接)在从case PPTP_CALL_CLEAR_NTFY接收后。它没有提供任何额外信息;除了连接已关闭。pptp_call_clear_rqstvoid pptp_call_close()

相关内容