在ubuntu上搭建pptpd后,在win10上连接发生错误,提示:
不能建立到远程计算机的连接。因此用于此连接的端口已关闭。
服务器syslog日志显示:
pppd[9614]: The remote system is required to authenticate itself
pppd[9614]: but I couldn't find any suitable secret (password) for it to use to do so.
经过各种查资料也没能解决,后来终于发现是用户名和密码没有加引号。
vim /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
"username" pptpd "password" *
修改后引发了新的错误:
win10连接提示:不能建立到远程计算机的连接。你可能需要更改此链接的网络设置。
服务器日志syslog显示:
pptpd[34543]: GRE: read(fd=6,buffer=56481d6884c0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
pptpd[34543]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
直接使用小米路由器的VPN功能连接成功!那么问题就定位到是本地局域网的转发问题!
在路由器上如果有DMZ功能添加本机IP即可,或者有PPTP穿透功能也可以,小米路由器可以指定使用通道的MAC地址也可以实现此功能。
引用:centos搭建vpn619错误_云上的小雨滴的技术博客_51CTO博客
引用:CentOS 一键搭建pptpd_weixin_30451709的博客-CSDN博客